From a56ad0ccacd0bc3588f86601ae2e09a5c173b236 Mon Sep 17 00:00:00 2001 From: mark_story Date: Mon, 28 Nov 2011 21:36:44 -0500 Subject: [PATCH] Fixing failing tests. --- .../Component/RequestHandlerComponentTest.php | 10 +++++----- .../Test/Case/TestSuite/ControllerTestCaseTest.php | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php b/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php index c73c4b67c..ec042758c 100644 --- a/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php @@ -468,13 +468,13 @@ class RequestHandlerComponentTest extends CakeTestCase { * @return void */ public function testRenderAsCalledTwice() { - $this->RequestHandler->renderAs($this->Controller, 'xml'); - $this->assertEquals($this->Controller->viewPath, 'RequestHandlerTest' . DS . 'xml'); - $this->assertEquals($this->Controller->layoutPath, 'xml'); + $this->RequestHandler->renderAs($this->Controller, 'print'); + $this->assertEquals('RequestHandlerTest' . DS . 'print', $this->Controller->viewPath); + $this->assertEquals('print', $this->Controller->layoutPath); $this->RequestHandler->renderAs($this->Controller, 'js'); - $this->assertEquals($this->Controller->viewPath, 'RequestHandlerTest' . DS . 'js'); - $this->assertEquals($this->Controller->layoutPath, 'js'); + $this->assertEquals('RequestHandlerTest' . DS . 'js', $this->Controller->viewPath); + $this->assertEquals('js', $this->Controller->layoutPath); $this->assertTrue(in_array('Js', $this->Controller->helpers)); } diff --git a/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php b/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php index 801fe0fa8..e6740ff71 100644 --- a/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php +++ b/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php @@ -290,7 +290,7 @@ class ControllerTestCaseTest extends CakeTestCase { $controller = $this->Case->generate('TestsApps'); $controller->Components->load('RequestHandler'); - $result = $this->Case->testAction('/tests_apps/index.json', array('return' => 'view')); + $result = $this->Case->testAction('/tests_apps/index.json', array('return' => 'contents')); $result = json_decode($result, true); $expected = array('cakephp' => 'cool'); $this->assertEquals($expected, $result);