Exemplo n.º 1
0
 /**
  * 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));
 }