r89290 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89289‎ | r89290 | r89291 >
Date:21:13, 1 June 2011
Author:brion
Status:ok
Tags:
Comment:
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.
Modified paths:
  • /trunk/phase3/tests/phpunit/includes/HttpTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/includes/HttpTest.php
@@ -115,11 +115,11 @@
116116 "Request took less than {$timeout}s via " . Http::$httpEngine );
117117 $this->assertEquals( $r, false, "false -- what we get on error from Http::get()" );
118118
119 - $r = Http::get( "http://www.example.com/this-file-does-not-exist", $timeout );
 119+ $r = Http::get( "http://www.mediawiki.org/xml/made-up-url", $timeout );
120120 $this->assertFalse( $r, "False on 404s" );
121121
122122
123 - $r = MWHttpRequest::factory( "http://www.example.com/this-file-does-not-exist" );
 123+ $r = MWHttpRequest::factory( "http://www.mediawiki.org/xml/made-up-url" );
124124 $er = $r->execute();
125125 if ( $r instanceof PhpHttpRequest && version_compare( '5.2.10', phpversion(), '>' ) ) {
126126 $this->assertRegexp( "/HTTP request failed/", $er->getWikiText() );

Status & tagging log