Permalink
Browse files

Fix viewpath for RequestHandler testing.

  • Loading branch information...
1 parent 359a770 commit 1ea163fbf16f82889d3773ecfff693e7c5703465 @predominant predominant committed Apr 23, 2010
Showing with 3 additions and 4 deletions.
  1. +3 −4 cake/tests/cases/libs/controller/components/request_handler.test.php
@@ -561,9 +561,8 @@ function testAjaxRedirectAsRequestAction() {
*/
function testBeforeRedirectCallbackWithArrayUrl() {
$_SERVER['HTTP_X_REQUESTED_WITH'] = 'XMLHttpRequest';
- App::build(array(
- 'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS)
- ), true);
+ $_paths = Configure::read('viewPaths');
+ Configure::write('viewPaths', array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS));
Router::setRequestInfo(array(
array('plugin' => null, 'controller' => 'accounts', 'action' => 'index', 'pass' => array(), 'named' => array(), 'form' => array(), 'url' => array('url' => 'accounts/'), 'bare' => 0),
array('base' => '/officespace', 'here' => '/officespace/accounts/', 'webroot' => '/officespace/')
@@ -578,7 +577,7 @@ function testBeforeRedirectCallbackWithArrayUrl() {
);
$result = ob_get_clean();
$this->assertEqual($result, 'one: first two: second');
- App::build();
+ Configure::write('viewPaths', $_paths);
}
}
?>

0 comments on commit 1ea163f

Please sign in to comment.