From a5a02925d879bfc413a6c8c72359e7c77d634308 Mon Sep 17 00:00:00 2001 From: mark_story Date: Tue, 1 Dec 2009 13:38:32 -0500 Subject: [PATCH] Adding test for previous commit. --- cake/tests/cases/libs/router.test.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cake/tests/cases/libs/router.test.php b/cake/tests/cases/libs/router.test.php index 2f2589975..151d1066e 100644 --- a/cake/tests/cases/libs/router.test.php +++ b/cake/tests/cases/libs/router.test.php @@ -2188,6 +2188,11 @@ class RouterRouteTestCase extends CakeTestCase { $this->assertFalse($result); + $route =& new RouterRoute('/foo/:controller/:action', array('action' => 'index')); + $result = $route->match(array('controller' => 'posts', 'action' => 'view')); + $this->assertEqual($result, '/foo/posts/view'); + + $route =& new RouterRoute('/:plugin/:id/*', array('controller' => 'posts', 'action' => 'view')); $result = $route->match(array('plugin' => 'test', 'controller' => 'posts', 'action' => 'view', 'id' => '1')); $this->assertEqual($result, '/test/1/');