ソースを参照

Updated test. Setting global config 'Routing.prefixes' is no longer a side affect of setting some prefixed route.

Sam 12 年 前
コミット
3bb9b64d5a
1 ファイル変更5 行追加3 行削除
  1. 5 3
      tests/TestCase/Routing/RouterTest.php

+ 5 - 3
tests/TestCase/Routing/RouterTest.php

@@ -1991,11 +1991,13 @@ class RouterTest extends TestCase {
 	}
 
 /**
- * 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);
@@ -2024,7 +2026,7 @@ class RouterTest extends TestCase {
 		$this->assertEquals($expected, $result);
 
 		$result = Router::prefixes();
-		$expected = array('admin');
+		$expected = array();
 		$this->assertEquals($expected, $result);
 
 		Router::reload();