r112209 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112208‎ | r112209 | r112210 >
Date:15:35, 23 February 2012
Author:preilly
Status:ok
Tags:
Comment:
fix broken test
Modified paths:
  • /trunk/extensions/MobileFrontend/tests/MobileFrontendTest.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/tests/MobileFrontendTest.php
@@ -44,10 +44,11 @@
4545 }
4646
4747 public function testDisableCaching() {
48 - global $wgRequest, $wgExtMobileFrontend;
 48+ global $wgRequest, $wgExtMobileFrontend, $wgSquidServers;
4949 $disableCaching = self::getMethod( 'disableCaching' );
50 -
51 - $_SERVER['HTTP_VIA'] = '.wikimedia.org:3128';
 50+
 51+ $wgSquidServers = array( '10.64.0.131' );
 52+ $_SERVER['REMOTE_ADDR'] = '10.64.0.131';
5253 $disableCaching->invokeArgs( $wgExtMobileFrontend, array() );
5354 $this->assertEquals( 'no-cache, must-revalidate', $wgRequest->response()->getheader( 'Cache-Control' ) );
5455 $this->assertEquals( 'Sat, 26 Jul 1997 05:00:00 GMT', $wgRequest->response()->getheader( 'Expires' ) );
@@ -75,4 +76,4 @@
7677 $this->assertEquals( '/path/morepath', $wgExtMobileFrontend->parseMobileUrlTemplate( 'path' ) );
7778 $this->assertEquals( array( 'host' => '%h0.m.%h1.%h2', 'path' => '/path/morepath' ), $wgExtMobileFrontend->parseMobileUrlTemplate());
7879 }
79 -}
\ No newline at end of file
 80+}

Status & tagging log