1
0
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:
Danny van Kooten
2022-02-17 10:31:41 +01:00
parent f6fede4f94
commit 85c453b12c
3 changed files with 6 additions and 13 deletions

View File

@@ -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);
}