Fixing failing tests.

This commit is contained in:
mark_story 2011-11-28 21:36:44 -05:00
parent 168c6f14c2
commit a56ad0ccac
2 changed files with 6 additions and 6 deletions

View file

@ -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));
}

View file

@ -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);