Skip to content

Commit

Permalink
MINOR Using Config system instead of Director::addRules() in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Harvey committed May 22, 2012
1 parent ae1a106 commit f446547
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/control/DirectorTest.php
Expand Up @@ -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'
));
}
Expand Down
2 changes: 1 addition & 1 deletion tests/control/RequestHandlingTest.php
Expand Up @@ -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",
Expand Down
5 changes: 3 additions & 2 deletions tests/forms/FormTest.php
Expand Up @@ -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'
));

0 comments on commit f446547

Please sign in to comment.