-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
6 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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) { | ||
|