Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
zonuexe committed Jul 31, 2023
1 parent 3acf6f9 commit 188158b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/RouterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

namespace Teto\Routing;

use function count;
use function explode;
use function preg_replace;
use function strlen;

/**
* @author USAMI Kenta <[email protected]>
* @copyright 2016 BaguetteHQ
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 188158b

Please sign in to comment.