mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Fixing failing tests.
This commit is contained in:
parent
168c6f14c2
commit
a56ad0ccac
2 changed files with 6 additions and 6 deletions
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue