diff options
Diffstat (limited to 'tests/phpunit/includes/HttpTest.php')
-rw-r--r-- | tests/phpunit/includes/HttpTest.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/phpunit/includes/HttpTest.php b/tests/phpunit/includes/HttpTest.php index 7698776c..11d8ed60 100644 --- a/tests/phpunit/includes/HttpTest.php +++ b/tests/phpunit/includes/HttpTest.php @@ -5,8 +5,9 @@ class HttpTest extends MediaWikiTestCase { /** * @dataProvider cookieDomains + * @covers Cookie::validateCookieDomain */ - function testValidateCookieDomain( $expected, $domain, $origin = null ) { + public function testValidateCookieDomain( $expected, $domain, $origin = null ) { if ( $origin ) { $ok = Cookie::validateCookieDomain( $domain, $origin ); $msg = "$domain against origin $origin"; @@ -50,8 +51,9 @@ class HttpTest extends MediaWikiTestCase { * Test Http::isValidURI() * @bug 27854 : Http::isValidURI is too lax * @dataProvider provideURI + * @covers Http::isValidURI */ - function testIsValidUri( $expect, $URI, $message = '' ) { + public function testIsValidUri( $expect, $URI, $message = '' ) { $this->assertEquals( $expect, (bool)Http::isValidURI( $URI ), @@ -132,7 +134,7 @@ class HttpTest extends MediaWikiTestCase { * rewritten when bug 29232 is taken care of (high-level handling of * HTTP redirects). */ - function testRelativeRedirections() { + public function testRelativeRedirections() { $h = MWHttpRequestTester::factory( 'http://oldsite/file.ext' ); # Forge a Location header @@ -176,7 +178,7 @@ class HttpTest extends MediaWikiTestCase { */ class MWHttpRequestTester extends MWHttpRequest { - // function derived from the MWHttpRequest factory function but + // function derived from the MWHttpRequest factory function but // returns appropriate tester class here public static function factory( $url, $options = null ) { if ( !Http::$httpEngine ) { @@ -194,6 +196,7 @@ class MWHttpRequestTester extends MWHttpRequest { throw new MWException( __METHOD__ . ': allow_url_fopen needs to be enabled for pure PHP' . ' http requests to work. If possible, curl should be used instead. See http://php.net/curl.' ); } + return new PhpHttpRequestTester( $url, $options ); default: } |