Index: trunk/phase3/includes/normal/CleanUpTest.php |
— | — | @@ -36,7 +36,14 @@ |
37 | 37 | |
38 | 38 | #ini_set( 'memory_limit', '40M' ); |
39 | 39 | |
40 | | -require_once 'PHPUnit/Framework.php'; |
| 40 | +require_once( 'PHPUnit/Runner/Version.php' ); |
| 41 | +if( version_compare( PHPUnit_Runner_Version::id(), '3.5.0', '>=' ) ) { |
| 42 | + # PHPUnit 3.5.0 introduced a nice autoloader based on class name |
| 43 | + require_once( 'PHPUnit/Autoload.php' ); |
| 44 | +} else { |
| 45 | + # Keep the old pre PHPUnit 3.5.0 behaviour for compatibility |
| 46 | + require_once 'PHPUnit/Framework.php'; |
| 47 | +} |
41 | 48 | require_once 'PHPUnit/TextUI/TestRunner.php'; |
42 | 49 | |
43 | 50 | require_once 'UtfNormal.php'; |