Fixed PHPUnit < 3.5 compatibiliy breaking change r72248, now we automatically use...
authorTrevor Parscal <tparscal@users.mediawiki.org>
Fri, 3 Sep 2010 00:41:52 +0000 (00:41 +0000)
committerTrevor Parscal <tparscal@users.mediawiki.org>
Fri, 3 Sep 2010 00:41:52 +0000 (00:41 +0000)
maintenance/tests/phpunit

index 073a2e4..ab13e84 100755 (executable)
@@ -2,7 +2,14 @@
 <?php
 
 require( dirname( __FILE__ ) . '/../commandLine.inc' );
-require_once 'PHPUnit/Autoload.php';
+// XXX: This can go away if everyone switches to PHPUnit 3.5
+if ( file_exists( get_include_path() . '/PHPUnit/Autoload.php' ) ) { 
+       // Works for PHPUnit >= 3.5
+       require_once 'PHPUnit/Autoload.php';
+} else {
+       // Works for PHPUnit < 3.5
+       require_once 'PHPUnit/TextUI/Command';
+}
 define( 'MW_PHPUNIT_TEST', 1 );
 
 $wgLocaltimezone = 'UTC';