Skip to content

Commit

Permalink
Fix viewpath for RequestHandler testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
predominant committed Apr 23, 2010
1 parent 359a770 commit 1ea163f
Showing 1 changed file with 3 additions and 4 deletions.
Expand Up @@ -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/')
Expand All @@ -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.