http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72249

Revision: 72249
Author:   tparscal
Date:     2010-09-03 00:41:52 +0000 (Fri, 03 Sep 2010)

Log Message:
-----------
Fixed PHPUnit < 3.5 compatibiliy breaking change r72248, now we automatically 
use the new/old way by checking for 'PHPUnit/Autoload.php'.

Modified Paths:
--------------
    trunk/phase3/maintenance/tests/phpunit

Modified: trunk/phase3/maintenance/tests/phpunit
===================================================================
--- trunk/phase3/maintenance/tests/phpunit      2010-09-03 00:32:03 UTC (rev 
72248)
+++ trunk/phase3/maintenance/tests/phpunit      2010-09-03 00:41:52 UTC (rev 
72249)
@@ -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';



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to