mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-02-07 12:36:25 +00:00
Adding tests for routes with UUID matches, closes #3973 (disproven)
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6405 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
074cfeb75d
commit
b93e5c13ea
1 changed files with 12 additions and 0 deletions
|
@ -601,6 +601,18 @@ class RouterTest extends UnitTestCase {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function testUuidRoutes() {
|
||||||
|
$this->router->reload();
|
||||||
|
$this->router->connect(
|
||||||
|
'/subjects/add/:category_id',
|
||||||
|
array('controller' => 'subjects', 'action' => 'add'),
|
||||||
|
array('category_id' => '\w{8}-\w{4}-\w{4}-\w{4}-\w{12}')
|
||||||
|
);
|
||||||
|
$result = $this->router->parse('/subjects/add/4795d601-19c8-49a6-930e-06a8b01d17b7');
|
||||||
|
$expected = array('pass' => array(), 'named' => array(), 'category_id' => '4795d601-19c8-49a6-930e-06a8b01d17b7', 'plugin' => null, 'controller' => 'subjects', 'action' => 'add');
|
||||||
|
$this->assertEqual($result, $expected);
|
||||||
|
}
|
||||||
|
|
||||||
function testRouteSymmetry() {
|
function testRouteSymmetry() {
|
||||||
$this->router->reload();
|
$this->router->reload();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue