Merge "Save generated parser output to cache in RefreshLinks"
[lhc/web/wiklou.git] / tests / phpunit / includes / FauxResponseTest.php
index 977c22b..7f41cfd 100644 (file)
  */
 
 class FauxResponseTest extends MediaWikiTestCase {
-       var $response;
+       /** @var FauxResponse */
+       protected $response;
 
        protected function setUp() {
                parent::setUp();
                $this->response = new FauxResponse;
        }
 
-       function testCookie() {
+       /**
+        * @covers FauxResponse::getcookie
+        * @covers FauxResponse::setcookie
+        */
+       public function testCookie() {
                $this->assertEquals( null, $this->response->getcookie( 'key' ), 'Non-existing cookie' );
                $this->response->setcookie( 'key', 'val' );
                $this->assertEquals( 'val', $this->response->getcookie( 'key' ), 'Existing cookie' );
        }
 
-       function testHeader() {
+       /**
+        * @covers FauxResponse::getheader
+        * @covers FauxResponse::header
+        */
+       public function testHeader() {
                $this->assertEquals( null, $this->response->getheader( 'Location' ), 'Non-existing header' );
 
                $this->response->header( 'Location: http://localhost/' );
@@ -52,7 +61,10 @@ class FauxResponseTest extends MediaWikiTestCase {
                $this->assertEquals( 'http://localhost/', $this->response->getheader( 'LOCATION' ), 'Get header case insensitive' );
        }
 
-       function testResponseCode() {
+       /**
+        * @covers FauxResponse::getStatusCode
+        */
+       public function testResponseCode() {
                $this->response->header( 'HTTP/1.1 200' );
                $this->assertEquals( 200, $this->response->getStatusCode(), 'Header with no message' );