|
|
@ -29,7 +29,7 @@ class RouterTest extends PHPUnit_Framework_TestCase |
|
|
|
$router->add('user', 'user/account/:id', 'user'); |
|
|
|
$route = $router->route('user/account/213'); |
|
|
|
$this->assertSame(1, count($route->getParams())); |
|
|
|
$this->assertSame(array('id' => 213), $route->getParams()); |
|
|
|
$this->assertSame(array('id' => '213'), $route->getParams()); |
|
|
|
$this->assertSame('user', $router->getRouteName()); |
|
|
|
} |
|
|
|
|
|
|
@ -41,10 +41,10 @@ class RouterTest extends PHPUnit_Framework_TestCase |
|
|
|
$route = $router->route('user/account/213'); |
|
|
|
$this->assertSame('user', $router->getRouteName()); |
|
|
|
$this->assertSame(1, count($route->getParams())); |
|
|
|
$this->assertSame(array('id' => 213), $route->getParams()); |
|
|
|
$this->assertSame(array('id' => '213'), $route->getParams()); |
|
|
|
$route = $router->route('sale/order/22'); |
|
|
|
$this->assertSame('sale', $router->getRouteName()); |
|
|
|
$this->assertSame(array('id' => 22), $route->getParams()); |
|
|
|
$this->assertSame(array('id' => '22'), $route->getParams()); |
|
|
|
} |
|
|
|
|
|
|
|
public function testRouteNotmatch() |
|
|
|