Permalink
Browse files

Fixing RequestHandler test case when app/views/posts/index.ctp is ava…

…ilable.
  • Loading branch information...
1 parent b39df8c commit df4cd12d0fb7c6c8bdf91408baf30f87b9ded13c @markstory markstory committed Nov 3, 2009
Showing with 4 additions and 1 deletion.
  1. +4 −1 cake/tests/cases/libs/controller/components/request_handler.test.php
@@ -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');
@@ -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.