From 6016958c3c1c39ba6bc2a51c7a9fa92ef49c0b7c Mon Sep 17 00:00:00 2001 From: Max Semenik Date: Tue, 10 May 2011 19:45:47 +0000 Subject: [PATCH] To prevent creepy errors like bug 28908, raised PHPUnit requirement to 3.5 --- tests/phpunit/phpunit.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/phpunit/phpunit.php b/tests/phpunit/phpunit.php index 7acc79ca12..39cccf8074 100755 --- a/tests/phpunit/phpunit.php +++ b/tests/phpunit/phpunit.php @@ -51,13 +51,10 @@ if( !in_array( '--configuration', $_SERVER['argv'] ) ) { } require_once( 'PHPUnit/Runner/Version.php' ); -if( version_compare( PHPUnit_Runner_Version::id(), '3.5.0', '>=' ) ) { - # PHPUnit 3.5.0 introduced a nice autoloader based on class name - require_once( 'PHPUnit/Autoload.php' ); -} else { - # Keep the old pre PHPUnit 3.5.0 behaviour for compatibility - require_once( 'PHPUnit/TextUI/Command.php' ); +if( version_compare( PHPUnit_Runner_Version::id(), '3.5.0', '<' ) ) { + die( 'PHPUnit 3.5 or later required, you have ' . PHPUnit_Runner_Version::id() . ".\n" ); } +require_once( 'PHPUnit/Autoload.php' ); require_once( "$IP/tests/TestsAutoLoader.php" ); MediaWikiPHPUnitCommand::main(); -- 2.20.1