cakephp/cakephp — pull request #1059 by djbobke (2013-01-06 12:39:56+00:00)
Title: CrudAuthorizeTest::testMapActionsGet/Set fail when having routing-prefixes configured

CrudAuthorizeTest::testMapActionsGet/Set fail when having routing-prefixes configured, attached patch fixes this. The attached patch also fixes other routing-prefixes than admin_.

1) CrudAuthorizeTest::testMapActionsGet
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
'remove' => 'delete'
+ 'admin_index' => 'read'
+ 'admin_add' => 'create'
+ 'admin_edit' => 'update'
+ 'admin_view' => 'read'
+ 'admin_remove' => 'delete'
+ 'admin_create' => 'create'
+ 'admin_read' => 'read'
+ 'admin_update' => 'update'
+ 'admin_delete' => 'delete'
)

/home/staging/lib/Cake/Test/Case/Controller/Component/Auth/CrudAuthorizeTest.php:134
/home/staging/lib/Cake/TestSuite/CakeTestCase.php:78
/home/staging/lib/Cake/TestSuite/CakeTestRunner.php:59
/home/staging/lib/Cake/TestSuite/CakeTestSuiteCommand.php:113
/home/staging/lib/Cake/Console/Command/TestShell.php:274
/home/staging/lib/Cake/Console/Command/TestsuiteShell.php:98
/home/staging/lib/Cake/Console/Shell.php:395
/home/staging/lib/Cake/Console/ShellDispatcher.php:201
/home/staging/lib/Cake/Console/ShellDispatcher.php:69

2) CrudAuthorizeTest::testMapActionsSet
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
'random' => 'custom'
+ 'admin_index' => 'read'
+ 'admin_add' => 'create'
+ 'admin_edit' => 'update'
+ 'admin_view' => 'read'
+ 'admin_remove' => 'delete'
+ 'admin_create' => 'create'
+ 'admin_read' => 'read'
+ 'admin_update' => 'update'
+ 'admin_delete' => 'delete'
)

/home/staging/lib/Cake/Test/Case/Controller/Component/Auth/CrudAuthorizeTest.php:169
/home/staging/lib/Cake/TestSuite/CakeTestCase.php:78
/home/staging/lib/Cake/TestSuite/CakeTestRunner.php:59
/home/staging/lib/Cake/TestSuite/CakeTestSuiteCommand.php:113
/home/staging/lib/Cake/Console/Command/TestShell.php:274
/home/staging/lib/Cake/Console/Command/TestsuiteShell.php:98
/home/staging/lib/Cake/Console/Shell.php:395
/home/staging/lib/Cake/Console/ShellDispatcher.php:201
/home/staging/lib/Cake/Console/ShellDispatcher.php:69