diff --git a/tests/TestCase/Routing/RouterTest.php b/tests/TestCase/Routing/RouterTest.php index be7f36866ef..9b9dedc26d8 100644 --- a/tests/TestCase/Routing/RouterTest.php +++ b/tests/TestCase/Routing/RouterTest.php @@ -1050,6 +1050,12 @@ public function testUrlGenerationNamedRoute() { array('controller' => 'users', 'action' => 'view'), array('_name' => 'test') ); + Router::connect( + '/view/*', + ['action' => 'view'], + ['_name' => 'Articles::view'] + ); + $url = Router::url('test', array('name' => 'mark')); $this->assertEquals('/users/mark', $url); @@ -1058,6 +1064,12 @@ public function testUrlGenerationNamedRoute() { $url = Router::url('users-index'); $this->assertEquals('/users', $url); + + $url = Router::url('Articles::view'); + $this->assertEquals('/view/', $url); + + $url = Router::url('Articles::view', ['1']); + $this->assertEquals('/view/1', $url); } /**