Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix viewpath for RequestHandler testing.

  • Loading branch information...
commit 1ea163fbf16f82889d3773ecfff693e7c5703465 1 parent 359a770
@predominant predominant authored
View
7 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);
}
}
?>
Please sign in to comment.
Something went wrong with that request. Please try again.