From: Brion Vibber Date: Wed, 1 Jun 2011 21:13:13 +0000 (+0000) Subject: HttpTest regression fix: test URL on example.com no longer returns a 404 (now a 302... X-Git-Tag: 1.31.0-rc.0~29797 X-Git-Url: http://git.cyclocoop.org/data/%24self?a=commitdiff_plain;h=218b50d703815a0413b321ecee91b8709ef4e147;p=lhc%2Fweb%2Fwiklou.git HttpTest regression fix: test URL on example.com no longer returns a 404 (now a 302 redirect), so switching the 404 tests to use an URL on mediawiki.org in the /xml/ dir where we stash actual files. --- diff --git a/tests/phpunit/includes/HttpTest.php b/tests/phpunit/includes/HttpTest.php index 4201399d07..c489ebb2ae 100644 --- a/tests/phpunit/includes/HttpTest.php +++ b/tests/phpunit/includes/HttpTest.php @@ -115,11 +115,11 @@ class HttpTest extends MediaWikiTestCase { "Request took less than {$timeout}s via " . Http::$httpEngine ); $this->assertEquals( $r, false, "false -- what we get on error from Http::get()" ); - $r = Http::get( "http://www.example.com/this-file-does-not-exist", $timeout ); + $r = Http::get( "http://www.mediawiki.org/xml/made-up-url", $timeout ); $this->assertFalse( $r, "False on 404s" ); - $r = MWHttpRequest::factory( "http://www.example.com/this-file-does-not-exist" ); + $r = MWHttpRequest::factory( "http://www.mediawiki.org/xml/made-up-url" ); $er = $r->execute(); if ( $r instanceof PhpHttpRequest && version_compare( '5.2.10', phpversion(), '>' ) ) { $this->assertRegexp( "/HTTP request failed/", $er->getWikiText() );