Index: trunk/phase3/maintenance/tests/phpunit |
— | — | @@ -2,7 +2,14 @@ |
3 | 3 | <?php |
4 | 4 | |
5 | 5 | require( dirname( __FILE__ ) . '/../commandLine.inc' ); |
6 | | -require_once 'PHPUnit/Autoload.php'; |
| 6 | +// XXX: This can go away if everyone switches to PHPUnit 3.5 |
| 7 | +if ( file_exists( get_include_path() . '/PHPUnit/Autoload.php' ) ) { |
| 8 | + // Works for PHPUnit >= 3.5 |
| 9 | + require_once 'PHPUnit/Autoload.php'; |
| 10 | +} else { |
| 11 | + // Works for PHPUnit < 3.5 |
| 12 | + require_once 'PHPUnit/TextUI/Command'; |
| 13 | +} |
7 | 14 | define( 'MW_PHPUNIT_TEST', 1 ); |
8 | 15 | |
9 | 16 | $wgLocaltimezone = 'UTC'; |