diff --git a/tests/RouterTest.php b/tests/RouterTest.php index 80d0014..851d7e1 100644 --- a/tests/RouterTest.php +++ b/tests/RouterTest.php @@ -2,6 +2,11 @@ namespace Teto\Routing; +use function count; +use function explode; +use function preg_replace; +use function strlen; + /** * @author USAMI Kenta * @copyright 2016 BaguetteHQ @@ -44,10 +49,9 @@ public function test_match($method, $path, $expected_value, $expected_param) $actual = self::$router->match($method, $path); $split_path = (strlen($path) === 1) ? [] : explode('/', substr($path, 1)); - $this->assertInstanceOf('\Teto\Routing\Action', $actual); $this->assertEquals($expected_value, $actual->value); $this->assertEquals($expected_param, $actual->param); - $this->assertEquals(count($split_path), count($actual->split_path)); + $this->assertCount($split_path, $actual->split_path); if ($actual->param_pos) { foreach ($actual->split_path as $i => $path) {