File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
tests/cases/libs/view/helpers Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -177,10 +177,10 @@ function Router() {
177
177
**/
178
178
function __setPrefixes () {
179
179
$ routing = Configure::read ('Routing ' );
180
- if (isset ($ routing ['admin ' ])) {
180
+ if (! empty ($ routing ['admin ' ])) {
181
181
$ this ->__prefixes [] = $ routing ['admin ' ];
182
182
}
183
- if (isset ($ routing ['prefixes ' ])) {
183
+ if (! empty ($ routing ['prefixes ' ])) {
184
184
$ this ->__prefixes = array_merge ($ this ->__prefixes , (array )$ routing ['prefixes ' ]);
185
185
}
186
186
}
Original file line number Diff line number Diff line change @@ -449,8 +449,11 @@ function testUrlGeneration() {
449
449
* @return void
450
450
*/
451
451
function testUrlGenerationWithPrefixes () {
452
- $ memberPrefixes = array ('prefix ' => 'members ' , 'members ' => true );
453
- Router::connect ('/members/:controller/:action/* ' , $ memberPrefixes );
452
+ $ _back = Configure::read ('Routing ' );
453
+
454
+ Configure::write ('Routing.prefixes ' , array ('members ' ));
455
+ Router::reload ();
456
+
454
457
Router::parse ('/ ' );
455
458
456
459
Router::setRequestInfo ( array (
@@ -500,6 +503,8 @@ function testUrlGenerationWithPrefixes() {
500
503
$ result = $ this ->Paginator ->url ($ options );
501
504
$ expected = '/posts/index/page:2/sort:Article.name/direction:desc ' ;
502
505
$ this ->assertEqual ($ result , $ expected );
506
+
507
+ Configure::write ('Routing ' , $ _back );
503
508
}
504
509
505
510
/**
You can’t perform that action at this time.
0 commit comments