mirror of
https://github.com/dannyvankooten/AltoRouter.git
synced 2025-08-05 16:07:32 +02:00
update phpunit to latest version
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -6,3 +6,4 @@ build
|
||||
vendor
|
||||
composer.lock
|
||||
phpunit.xml
|
||||
.phpunit.result.cache
|
@@ -23,9 +23,8 @@
|
||||
"php": ">=5.6.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "5.7.*",
|
||||
"codeclimate/php-test-reporter": "dev-master",
|
||||
"squizlabs/php_codesniffer": "3.4.2"
|
||||
"phpunit/phpunit": "9.5.*",
|
||||
"squizlabs/php_codesniffer": "3.6.2"
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": ["AltoRouter.php"]
|
||||
|
@@ -58,19 +58,11 @@ class AltoRouterTest extends PHPUnit\Framework\TestCase
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
protected function setUp() : void
|
||||
{
|
||||
$this->router = new AltoRouterDebug;
|
||||
}
|
||||
|
||||
/**
|
||||
* Tears down the fixture, for example, closes a network connection.
|
||||
* This method is called after a test is executed.
|
||||
*/
|
||||
protected function tearDown()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers AltoRouter::getRoutes
|
||||
*/
|
||||
@@ -81,7 +73,7 @@ class AltoRouterTest extends PHPUnit\Framework\TestCase
|
||||
$target = static function () {
|
||||
};
|
||||
|
||||
$this->assertInternalType('array', $this->router->getRoutes());
|
||||
$this->assertIsArray($this->router->getRoutes());
|
||||
// $this->assertIsArray($this->router->getRoutes()); // for phpunit 7.x
|
||||
$this->router->map($method, $route, $target);
|
||||
$this->assertEquals([[$method, $route, $target, null]], $this->router->getRoutes());
|
||||
@@ -134,6 +126,7 @@ class AltoRouterTest extends PHPUnit\Framework\TestCase
|
||||
*/
|
||||
public function testAddRoutesThrowsExceptionOnInvalidArgument()
|
||||
{
|
||||
$this->expectException(RuntimeException::class);
|
||||
$this->router->addRoutes(new stdClass);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user