diff options
author | Amenadiel <amenadiel@gmail.com> | 2017-08-18 21:51:33 +0300 |
---|---|---|
committer | Amenadiel <amenadiel@gmail.com> | 2017-08-18 21:51:33 +0300 |
commit | 9e118b23ff5bae6838e05d5ac71722c6c9135d78 (patch) | |
tree | bc005c592f34f5f26cf2351788a2324c78808cc5 /Makefile | |
parent | a5d38628800385c4225500a09fb1ba4e67905619 (diff) |
Homologates views behavior and controller ClassNames
- Every view (src/views/*.php) will declare a $do_render variable as false
- If the view isn't included from inside a route, it will require lib.inc.php and set $do_render to true
- The view will instance its corresponding controller
- If the value of $do_render is true, the view will also call the render() method on the instance
- If the value of $do_render is false, then the instance can be grabbed from inside a route to capture its output and print it using the $response object
- Views than included dashes or underscores have been renamed to just lowercase characters
- Their corresponding controllers have been renames as <view filename with first character in Uppercase>Controller. For example, tables.php instances TablesController.
- Using a Slim Middleware, the $container gains properties requestobj and responseobj, due to the fact that $container->request and $container->response are frozen objects which do not contain properties such as parameters and route information.
- Using requestobj and responseobj, the container property used to instance controllers can return a response method directly
- A new route with pattern /src/views/{subject} has been created. It instances the respective controller and returns its render method (this is a WIP)
- Codeception has been added to the composer dev-dependencies. A *make test* task has been added to Makefile and will run basic unit tests. Eventually, more tests will be added.
- TreeController, as called when action is *tree* or *subtree* will return a proper response object with content type xml, if inside a route.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -3,7 +3,7 @@ VERSION = $(shell cat composer.json | sed -n 's/.*"version": "\([^"]*\)",/\1/p') SHELL = /usr/bin/env bash default: install -.PHONY: tag install +.PHONY: tag install test version: @echo $(VERSION) @@ -28,4 +28,7 @@ tag_and_push: git push git push --tags -tag: update_version tag_and_push
\ No newline at end of file +tag: update_version tag_and_push + +test: + ./vendor/bin/codecept run unit --debug
\ No newline at end of file |