r90154 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90153‎ | r90154 | r90155 >
Date:20:57, 15 June 2011
Author:demon
Status:deferred (Comments)
Tags:
Comment:
Followup r90105, ReflectionMethod::setAccessible() requires PHP 5.3.2. Mark incomplete otherwise
Modified paths:
  • /trunk/phase3/tests/phpunit/includes/installer/InstallerTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/includes/installer/InstallerTest.php
@@ -20,10 +20,14 @@
2121 $oldServer = $_SERVER;
2222 $_SERVER = $input;
2323 $rm = new ReflectionMethod( 'Installer_TestHelper', 'envCheckServer' );
24 - $rm->setAccessible( true );
25 - $rm->invoke( $installer );
26 - $_SERVER = $oldServer;
27 - $this->assertEquals( $expected, $installer->getVar( 'wgServer' ), $description );
 24+ if( !method_exists( $rm, 'setAccessible' ) ) {
 25+ $this->markTestIncomplete( "Test requires PHP 5.3.2 or above for ReflectionMethod::setAccessible" );
 26+ } else {
 27+ $rm->setAccessible( true );
 28+ $rm->invoke( $installer );
 29+ $_SERVER = $oldServer;
 30+ $this->assertEquals( $expected, $installer->getVar( 'wgServer' ), $description );
 31+ }
2832 }
2933
3034 function provideEnvCheckServer() {

Follow-up revisions

RevisionCommit summaryAuthorDate
r90194Fixes for r90105, r90193:...tstarling05:52, 16 June 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r90105* (bug 28798) Set $wgServer in the default LocalSettings.php...tstarling07:35, 15 June 2011

Comments

#Comment by Hashar (talk | contribs)   20:59, 15 June 2011

Work around works for me.

Status & tagging log