From f04b134ebd77e8b796455bc24dcbf98c4c346a65 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Wed, 15 Jun 2011 20:57:13 +0000 Subject: [PATCH] Followup r90105, ReflectionMethod::setAccessible() requires PHP 5.3.2. Mark incomplete otherwise --- tests/phpunit/includes/installer/InstallerTest.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/phpunit/includes/installer/InstallerTest.php b/tests/phpunit/includes/installer/InstallerTest.php index e38d1c186d..bcba7521af 100644 --- a/tests/phpunit/includes/installer/InstallerTest.php +++ b/tests/phpunit/includes/installer/InstallerTest.php @@ -20,10 +20,14 @@ class InstallerTest extends MediaWikiTestCase { $oldServer = $_SERVER; $_SERVER = $input; $rm = new ReflectionMethod( 'Installer_TestHelper', 'envCheckServer' ); - $rm->setAccessible( true ); - $rm->invoke( $installer ); - $_SERVER = $oldServer; - $this->assertEquals( $expected, $installer->getVar( 'wgServer' ), $description ); + if( !method_exists( $rm, 'setAccessible' ) ) { + $this->markTestIncomplete( "Test requires PHP 5.3.2 or above for ReflectionMethod::setAccessible" ); + } else { + $rm->setAccessible( true ); + $rm->invoke( $installer ); + $_SERVER = $oldServer; + $this->assertEquals( $expected, $installer->getVar( 'wgServer' ), $description ); + } } function provideEnvCheckServer() { -- 2.20.1