Skip to content

Commit 09d8143

Browse files
committed
improve tests
1 parent c481f06 commit 09d8143

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/RouterTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,8 @@ public function testRun() : void
428428
$routes[1]->getPath()
429429
));
430430

431+
$this->assertNotNull($router->getMatchedRoute());
432+
$this->assertSame($routes[1]->getName(), $router->getMatchedRoute()->getName());
431433
$this->assertTrue($routes[1]->getRequestHandler()->isRunned());
432434
}
433435

@@ -509,6 +511,8 @@ public function testHandle() : void
509511
$routes[2]->getPath()
510512
));
511513

514+
$this->assertNotNull($router->getMatchedRoute());
515+
$this->assertSame($routes[2]->getName(), $router->getMatchedRoute()->getName());
512516
$this->assertTrue($routes[2]->getRequestHandler()->isRunned());
513517
}
514518

0 commit comments

Comments
 (0)