From 218b50d703815a0413b321ecee91b8709ef4e147 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 1 Jun 2011 21:13:13 +0000 Subject: [PATCH] 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. --- tests/phpunit/includes/HttpTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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() ); -- 2.20.1