summaryrefslogtreecommitdiffstats
path: root/tests/Router
Commit message (Collapse)AuthorAgeFilesLines
* Implicit fn route for Glob router.Arnold Daniels2017-06-081-0/+16
| | | | Passing a closure or invokable object, will be seen as the fn property of a route definition.
* Removed absolete RunnerTestArnold Daniels2017-01-245-43/+4
| | | | Fixed @use in tests
* Update to Jasny PHP code quality 2.1Arnold Daniels2017-01-249-27/+30
| | | | Use Jasny\TestHelper (rather than defining a similar in this lib)
* Renamed Routes to RoutesInterfaceArnold Daniels2017-01-243-14/+14
|
* Added RouterInterfaceArnold Daniels2017-01-241-4/+4
|
* Added ability to use Dependency injectionArnold Daniels2016-12-208-220/+388
| | | | | | | | Replaced runner factory with delegated runner Controller runner now uses a factory callable Added ControllerFactory class The ControllerFactory chain another method for instantiation. This can be use to connect a DI container. All runners return not found and trigger a notice if they can't run. rather than throwing an exception.
* Rewrite ErrorPage testsorigin/errorpageArnold Daniels2016-12-021-114/+72
|
* Enforce that the namespace of a controller is done through an arrayorigin/strict-controller-classArnold Daniels2016-11-291-0/+5
| | | | Allowing to use a backslash could also lead to security issues
* Be strict on translating controller property to class nameArnold Daniels2016-11-292-14/+37
| | | | | | | | Things like `-abc-def-`, `abc--def`, `AbcDef` and `abc_def` should not result in `AbcDef`. Only `abc-def` should. Do a case insensitve match when matching routes. Check if casing of the generated class name matches the casing of the actual class All together, this should prevent security issues.
* Use an array as `controller` property to specify the namespaceorigin/controller-runner-namespaceArnold Daniels2016-11-291-5/+13
|
* Added determine route middlewareorigin/determine-route-middlewareArnold Daniels2016-11-291-0/+72
| | | | This middleware can determine the route at forehand, so it can be used by other middleware
* Support taking stdClass instead of an array as route listorigin/glob-stdclass-routesArnold Daniels2016-11-291-0/+22
|
* Merge branch 'master' into controller-runner-notfoundorigin/controller-runner-notfoundArnold Daniels2016-11-291-1/+1
|\
| * Specify a path when adding middlewareArnold Daniels2016-11-291-1/+1
| |
* | Let the controller runner return a not found responseArnold Daniels2016-11-291-24/+39
|/ | | | If the controller class doesn't exist of isn't invocable, a noticed is issued and a 404 not found response is returned, instead of throwing an Exception.
* Fix testsv1.0.2Arnold Daniels2016-11-222-8/+13
|
* Prepend 'Controller' to controller classArnold Daniels2016-11-221-7/+9
|
* Fix issue with Routes\Glob not working with full urlv1.0.1Arnold Daniels2016-11-221-2/+7
|
* Move route binding (used in Glob) to a traitorigin/fix-testsArnold Daniels2016-11-033-212/+309
| | | | | Added tests for Route Added missing @covers
* Improved tests for Routes/GlobArnold Daniels2016-11-031-127/+224
|
* Error handler has moved to it's own libraryArnold Daniels2016-10-301-86/+0
|
* Use mocks for NotFound middlewareArnold Daniels2016-10-251-201/+162
|
* Minor fixes for Middleware\BasePath testsArnold Daniels2016-10-211-71/+71
|
* Use vfsStream for Runner\PhpScript testsArnold Daniels2016-10-212-56/+93
|
* Put RunnerFactory one dir upArnold Daniels2016-10-205-44/+67
| | | | | Fix RunnerFactory tests Started with putting the tests in namespaces
* Use mock for Runner\ControllerArnold Daniels2016-10-201-120/+57
| | | | `Runner\Controller::instantiate()` doesn't have to be covered with tests
* Test Runner\Callback RuntimeExceptionArnold Daniels2016-10-201-1/+35
|
* Use mocks for Runner\CallbackArnold Daniels2016-10-201-47/+20
| | | | Fix bug in Runner\Callback
* Use mocks for RunnerTestArnold Daniels2016-10-201-30/+23
| | | | Put createCallbackMock in a trait
* Merge remote-tracking branch 'origin/router-cleanup'Arnold Daniels2016-10-205-0/+773
|\
| * Merge pull request #10 from Minstel/middleware-errorsorigin/router-cleanupArnold Daniels2016-10-203-1/+239
| |\ | | | | | | Middleware errors
| | * 'Error Handler' middlewareminstel2016-10-171-0/+86
| | |
| | * 'Error page' middleware. Switched names for router 'run' and 'handle' methodsminstel2016-10-172-1/+153
| | |
| * | Merge pull request #9 from Minstel/middleware-base-pathArnold Daniels2016-10-191-0/+235
| |\ \ | | | | | | | | 'Base Path' middleware
| | * | Fixesminstel2016-10-191-71/+24
| | | |
| | * | 'Base Path' middlewareminstel2016-10-171-0/+282
| | |/
| * | Major fixes to 'NotFound' and it's testsminstel2016-10-141-39/+107
| | |
| * | Fixes to prev commitminstel2016-10-131-17/+24
| | |
| * | 'Not found' middlewareminstel2016-10-132-0/+225
| |/
* | Merge branch 'master' into Add_the_route_as_ServerRequest_attributeArnold Daniels2016-10-181-0/+1
|\ \
| * \ Merge remote-tracking branch 'origin/router-cleanup' into glob-testsArnold Daniels2016-10-175-2/+380
| |\ \ | | |/
| * | Use phpunit 5's createMock rather than getMockArnold Daniels2016-10-131-8/+19
| | | | | | | | | | | | Minor fixes in tests and code
* | | Minor fixminstel2016-10-171-1/+1
| | |
* | | Implemented RunnerFactoryminstel2016-10-172-30/+41
| | |
* | | Use phpunit 5's createMock rather than getMockArnold Daniels2016-10-171-5/+17
| | | | | | | | | | | | Minor fixes in tests and code
* | | Add the route as ServerRequest attributeminstel2016-10-174-11/+4
| |/ |/|
* | Implementation and tests for Router. Minor fixesminstel2016-10-114-10/+10
| |
* | Implementation as tests for Runner/Controllerminstel2016-10-111-0/+140
| |
* | Implementation and test for Runner/PhpScriptminstel2016-10-102-3/+94
| |
* | Implementation and tests for Runner/Callback. Minor fixesminstel2016-10-082-9/+79
| |
* | Added test for Runner class. Minor fixesminstel2016-10-082-4/+79
|/
* Require jasny/php-code-qualityArnold Daniels2016-10-071-5/+5
|
* Created tests for Router/Routes/Globminstel2016-10-061-0/+428