Skip to content

Commit

Permalink
Updated test. Setting global config 'Routing.prefixes' is no longer a…
Browse files Browse the repository at this point in the history
… side affect of setting some prefixed route.
  • Loading branch information
sgpinkus committed Feb 11, 2014
1 parent e8a23e0 commit 3bb9b64
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/TestCase/Routing/RouterTest.php
Expand Up @@ -1991,11 +1991,13 @@ public function testParsingWithPatternOnAction() {
}

/**
* testParsingWithPrefixes method
* testParsingWithLiteralPrefixes method
*
* @return void
*/
public function testParsingWithPrefixes() {
public function testParsingWithLiteralPrefixes() {
Configure::write('Routing.prefixes', array());
Router::reload();
$adminParams = array('prefix' => 'admin');
Router::connect('/admin/:controller', $adminParams);
Router::connect('/admin/:controller/:action', $adminParams);
Expand Down Expand Up @@ -2024,7 +2026,7 @@ public function testParsingWithPrefixes() {
$this->assertEquals($expected, $result);

$result = Router::prefixes();
$expected = array('admin');
$expected = array();
$this->assertEquals($expected, $result);

Router::reload();
Expand Down

0 comments on commit 3bb9b64

Please sign in to comment.