/**
  * Test that the Controller response object is working properly for get/set/unset of a controller property
  */
 public function testResponse()
 {
     $controller = new TestController();
     $response = new WikiaResponse('html');
     // setResponse and getResponse
     $controller->setResponse($response);
     $this->assertEquals($response, $controller->getResponse());
     // setVal and getVal
     $controller->foo = 'foo';
     $this->assertFalse(empty($controller->foo));
     $this->assertEquals($controller->foo, 'foo');
     // unset
     unset($controller->foo);
     $this->assertTrue(empty($controller->foo));
 }
Exemple #2
0
 protected function createController()
 {
     $c = new TestController();
     $c->setResponse(new Sabel_Response_Object());
     return $c;
 }