summaryrefslogtreecommitdiff
path: root/tests/phpunit/includes/FauxResponseTest.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-12-08 09:55:49 +0100
committerPierre Schmitz <pierre@archlinux.de>2013-12-08 09:55:49 +0100
commit4ac9fa081a7c045f6a9f1cfc529d82423f485b2e (patch)
treeaf68743f2f4a47d13f2b0eb05f5c4aaf86d8ea37 /tests/phpunit/includes/FauxResponseTest.php
parentaf4da56f1ad4d3ef7b06557bae365da2ea27a897 (diff)
Update to MediaWiki 1.22.0
Diffstat (limited to 'tests/phpunit/includes/FauxResponseTest.php')
-rw-r--r--tests/phpunit/includes/FauxResponseTest.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/phpunit/includes/FauxResponseTest.php b/tests/phpunit/includes/FauxResponseTest.php
index 56691c9e..f9ba1b3b 100644
--- a/tests/phpunit/includes/FauxResponseTest.php
+++ b/tests/phpunit/includes/FauxResponseTest.php
@@ -30,13 +30,13 @@ class FauxResponseTest extends MediaWikiTestCase {
$this->response = new FauxResponse;
}
- function testCookie() {
+ 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() {
+ public function testHeader() {
$this->assertEquals( null, $this->response->getheader( 'Location' ), 'Non-existing header' );
$this->response->header( 'Location: http://localhost/' );
@@ -47,9 +47,12 @@ class FauxResponseTest extends MediaWikiTestCase {
$this->response->header( 'Location: http://127.0.0.2/', false );
$this->assertEquals( 'http://127.0.0.1/', $this->response->getheader( 'Location' ), 'Same header with override disabled' );
+
+ $this->response->header( 'Location: http://localhost/' );
+ $this->assertEquals( 'http://localhost/', $this->response->getheader( 'LOCATION' ), 'Get header case insensitive' );
}
- function testResponseCode() {
+ public function testResponseCode() {
$this->response->header( 'HTTP/1.1 200' );
$this->assertEquals( 200, $this->response->getStatusCode(), 'Header with no message' );