Merge "Revert "(Bug 41436) Tone down sanity check, just warn, don't die.""
[lhc/web/wiklou.git] / tests / phpunit / phpunit.php
index e3f780b..bcbf4ec 100755 (executable)
@@ -9,7 +9,7 @@
 /* Configuration */
 
 // Evaluate the include path relative to this file
-$IP = dirname( dirname( dirname( __FILE__ ) ) );
+$IP = dirname( dirname( __DIR__ ) );
 
 // Set a flag which can be used to detect when other scripts have been entered through this entry point or not
 define( 'MW_PHPUNIT_TEST', true );
@@ -34,6 +34,10 @@ class PHPUnitMaintClass extends Maintenance {
                global $wgMainCacheType, $wgMessageCacheType, $wgParserCacheType;
                global $wgLanguageConverterCacheType, $wgUseDatabaseMessages;
                global $wgLocaltimezone, $wgLocalisationCacheConf;
+               global $wgDevelopmentWarnings;
+
+               // wfWarn should cause tests to fail
+               $wgDevelopmentWarnings = true;
 
                $wgMainCacheType = CACHE_NONE;
                $wgMessageCacheType = CACHE_NONE;
@@ -94,8 +98,8 @@ require( RUN_MAINTENANCE_IF_MAIN );
 require_once( 'PHPUnit/Runner/Version.php' );
 
 if( PHPUnit_Runner_Version::id() !== '@package_version@'
-   && version_compare( PHPUnit_Runner_Version::id(), '3.5.0', '<' ) ) {
-       die( 'PHPUnit 3.5 or later required, you have ' . PHPUnit_Runner_Version::id() . ".\n" );
+   && version_compare( PHPUnit_Runner_Version::id(), '3.6.7', '<' ) ) {
+       die( 'PHPUnit 3.6.7 or later required, you have ' . PHPUnit_Runner_Version::id() . ".\n" );
 }
 require_once( 'PHPUnit/Autoload.php' );