Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit f446547cd79aa819c2b5c3625ab8052fceede63e 1 parent ae1a106
@halkyon halkyon authored
View
2  tests/control/DirectorTest.php
@@ -17,7 +17,7 @@ function setUp() {
self::$originalRequestURI = $_SERVER['REQUEST_URI'];
}
- Director::addRules(99, array(
+ Config::inst()->update('Director', 'rules', array(
'DirectorTestRule/$Action/$ID/$OtherID' => 'DirectorTestRequest_Controller'
));
}
View
2  tests/control/RequestHandlingTest.php
@@ -250,7 +250,7 @@ function testActionHandlingOnField() {
/**
* Director rules for the test
*/
-Director::addRules(50, array(
+Config::inst()->update('Director', 'rules', array(
// If we don't request any variables, then the whole URL will get shifted off. This is fine, but it means that the
// controller will have to parse the Action from the URL itself.
'testGoodBase1' => "RequestHandlingTest_Controller",
View
5 tests/forms/FormTest.php
@@ -508,6 +508,7 @@ function getViewer($action = null) {
}
}
-Director::addRules(50, array(
- 'FormTest_Controller' => "FormTest_Controller",
+Config::inst()->update('Director', 'rules', array(
+ 'FormTest_Controller' => 'FormTest_Controller'
));
+
Please sign in to comment.
Something went wrong with that request. Please try again.