mirror of
https://github.com/dannyvankooten/AltoRouter.git
synced 2025-01-17 12:18:16 +01:00
fix phpunit on older php versions
This commit is contained in:
parent
ecb5f69042
commit
dce6efdea2
@ -29,7 +29,7 @@ echo $router->generate( 'user-details', array( 'id' => 5 ) ); // Output: "/users
|
||||
|
||||
## Getting started
|
||||
|
||||
You need PHP >= 5.3 to use AltoRouter.
|
||||
You need PHP >= 5.3 to use AltoRouter, although we highly recommend you [use an officially supported PHP version](https://secure.php.net/supported-versions.php).
|
||||
|
||||
- [Install AltoRouter](http://altorouter.com/usage/install.html)
|
||||
- [Rewrite all requests to AltoRouter](http://altorouter.com/usage/rewrite-requests.html)
|
||||
|
@ -20,10 +20,10 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
"php": ">=5.6.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "7.5.*",
|
||||
"phpunit/phpunit": "5.7.*",
|
||||
"codeclimate/php-test-reporter": "dev-master"
|
||||
},
|
||||
"autoload": {
|
||||
|
@ -73,7 +73,8 @@ class AltoRouterTest extends PHPUnit\Framework\TestCase
|
||||
$route = '/[:controller]/[:action]';
|
||||
$target = function(){};
|
||||
|
||||
$this->assertIsArray($this->router->getRoutes());
|
||||
$this->assertInternalType('array', $this->router->getRoutes());
|
||||
// $this->assertIsArray($this->router->getRoutes()); // for phpunit 7.x
|
||||
$this->router->map($method, $route, $target);
|
||||
$this->assertEquals(array(array($method, $route, $target, null)), $this->router->getRoutes());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user