Skip to content

Commit

Permalink
Add _ext test in Route.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jul 4, 2012
1 parent 1fa9da2 commit 9eca07a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lib/Cake/Test/TestCase/Routing/Route/RouteTest.php
Expand Up @@ -423,6 +423,21 @@ public function testMatchWithPassedArgs() {
$this->assertFalse($result);
}

/**
* Test that extensions work.
*
* @return void
*/
public function testMatchWithExtension() {
$route = new Route('/:controller/:action');
$result = $route->match(array(
'controller' => 'posts',
'action' => 'index',
'_ext' => 'json'
));
$this->assertEquals('/posts/index.json', $result);
}

/**
* test that match with patterns works.
*
Expand Down

0 comments on commit 9eca07a

Please sign in to comment.