Index: trunk/phase3/tests/RunSeleniumTests.php |
— | — | @@ -24,13 +24,25 @@ |
25 | 25 | * http://www.gnu.org/copyleft/gpl.html |
26 | 26 | */ |
27 | 27 | |
| 28 | +$IP = dirname( dirname( __FILE__ ) ); |
| 29 | + |
28 | 30 | define( 'SELENIUMTEST', true ); |
29 | 31 | |
30 | 32 | //require_once( dirname( __FILE__ ) . '/../maintenance/commandLine.inc' ); |
31 | 33 | require( dirname( __FILE__ ) . '/../maintenance/Maintenance.php' ); |
32 | | -require_once( 'PHPUnit/Framework.php' ); |
| 34 | + |
| 35 | +require_once( 'PHPUnit/Runner/Version.php' ); |
| 36 | +if( version_compare( PHPUnit_Runner_Version::id(), '3.5.0', '>=' ) ) { |
| 37 | + # PHPUnit 3.5.0 introduced a nice autoloader based on class name |
| 38 | + require_once( 'PHPUnit/Autoload.php' ); |
| 39 | +} else { |
| 40 | + # Keep the old pre PHPUnit 3.5.0 behaviour for compatibility |
| 41 | + require_once( 'PHPUnit/TextUI/Command.php' ); |
| 42 | +} |
| 43 | + |
33 | 44 | require_once( 'PHPUnit/Extensions/SeleniumTestCase.php' ); |
34 | 45 | include_once( 'PHPUnit/Util/Log/JUnit.php' ); |
| 46 | + |
35 | 47 | require_once( dirname( __FILE__ ) . "/selenium/SeleniumServerManager.php" ); |
36 | 48 | |
37 | 49 | class SeleniumTester extends Maintenance { |