mirror of
https://github.com/dannyvankooten/AltoRouter.git
synced 2025-08-26 09:34:22 +02:00
update phpunit to latest version
This commit is contained in:
@@ -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