Skip to content
This repository
Browse code

MINOR Using Config system instead of Director::addRules() in tests

  • Loading branch information...
commit f446547cd79aa819c2b5c3625ab8052fceede63e 1 parent ae1a106
Sean Harvey authored May 22, 2012
2  tests/control/DirectorTest.php
@@ -17,7 +17,7 @@ function setUp() {
17 17
 			self::$originalRequestURI = $_SERVER['REQUEST_URI'];
18 18
 		}
19 19
 		
20  
-		Director::addRules(99, array(
  20
+		Config::inst()->update('Director', 'rules', array(
21 21
 			'DirectorTestRule/$Action/$ID/$OtherID' => 'DirectorTestRequest_Controller'
22 22
 		));
23 23
 	}
2  tests/control/RequestHandlingTest.php
@@ -250,7 +250,7 @@ function testActionHandlingOnField() {
250 250
 /**
251 251
  * Director rules for the test
252 252
  */
253  
-Director::addRules(50, array(
  253
+Config::inst()->update('Director', 'rules', array(
254 254
 	// If we don't request any variables, then the whole URL will get shifted off.  This is fine, but it means that the
255 255
 	// controller will have to parse the Action from the URL itself.
256 256
 	'testGoodBase1' => "RequestHandlingTest_Controller",
5  tests/forms/FormTest.php
@@ -508,6 +508,7 @@ function getViewer($action = null) {
508 508
 	}
509 509
 }
510 510
 
511  
-Director::addRules(50, array(
512  
-	'FormTest_Controller' => "FormTest_Controller",
  511
+Config::inst()->update('Director', 'rules', array(
  512
+	'FormTest_Controller' => 'FormTest_Controller'
513 513
 ));
  514
+

0 notes on commit f446547

Please sign in to comment.
Something went wrong with that request. Please try again.