/**
  * test that calling renderAs() more than once continues to work.
  *
  * @link #6466
  * @return void
  */
 public function testRenderAsCalledTwice()
 {
     $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('RequestHandlerTest' . DS . 'js', $this->Controller->viewPath);
     $this->assertEquals('js', $this->Controller->layoutPath);
     $this->assertTrue(in_array('Js', $this->Controller->helpers));
 }
 /**
  * test that calling renderAs() more than once continues to work.
  *
  * @link #6466
  * @return void
  */
 function testRenderAsCalledTwice()
 {
     $this->RequestHandler->renderAs($this->Controller, 'xml');
     $this->assertEqual($this->Controller->viewPath, 'request_handler_test' . DS . 'xml');
     $this->assertEqual($this->Controller->layoutPath, 'xml');
     $this->assertTrue(in_array('Xml', $this->Controller->helpers));
     $this->RequestHandler->renderAs($this->Controller, 'js');
     $this->assertEqual($this->Controller->viewPath, 'request_handler_test' . DS . 'js');
     $this->assertEqual($this->Controller->layoutPath, 'js');
     $this->assertTrue(in_array('Js', $this->Controller->helpers));
 }
예제 #3
0
 /**
  * testRenderAs method
  *
  * @access public
  * @return void
  */
 function testRenderAs()
 {
     $this->assertFalse(in_array('Xml', $this->Controller->helpers));
     $this->RequestHandler->renderAs($this->Controller, 'xml');
     $this->assertTrue(in_array('Xml', $this->Controller->helpers));
 }