Skip to content

Commit

Permalink
Fixing RequestHandler test case when app/views/posts/index.ctp is ava…
Browse files Browse the repository at this point in the history
…ilable.
  • Loading branch information
markstory committed Nov 3, 2009
1 parent b39df8c commit df4cd12
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -561,7 +561,9 @@ function testClientProperties() {
function testAjaxRedirectAsRequestAction() {
$_SERVER['HTTP_X_REQUESTED_WITH'] = 'XMLHttpRequest';
$this->_init();
App::build(array('views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS)));
App::build(array(
'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS)
), true);

$this->Controller->RequestHandler = new NoStopRequestHandler($this);
$this->Controller->RequestHandler->expectOnce('_stop');
Expand All @@ -574,6 +576,7 @@ function testAjaxRedirectAsRequestAction() {
$this->assertPattern('/posts index/', $result, 'RequestAction redirect failed.');

unset($_SERVER['HTTP_X_REQUESTED_WITH']);
App::build();
}
}
?>

0 comments on commit df4cd12

Please sign in to comment.