Merge "$wgContLang global unneeded in braceSubstitution() since fc00763f0"
[lhc/web/wiklou.git] / tests / phpunit / phpunit.php
index 2a0298a..2ec0744 100755 (executable)
@@ -8,14 +8,11 @@
 
 /* Configuration */
 
-// Evaluate the include path relative to this 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 );
 
 // Start up MediaWiki in command-line mode
-require_once( "$IP/maintenance/Maintenance.php" );
+require_once( dirname( dirname( __DIR__ ) ) . "/maintenance/Maintenance.php" );
 
 class PHPUnitMaintClass extends Maintenance {
 
@@ -50,6 +47,12 @@ class PHPUnitMaintClass extends Maintenance {
                $wgLocaltimezone = 'UTC';
 
                $wgLocalisationCacheConf['storeClass'] = 'LCStore_Null';
+
+               // Bug 44192 Do not attempt to send a real e-mail
+               Hooks::clear( 'AlternateUserMailer' );
+               Hooks::register( 'AlternateUserMailer',
+                       function() { return false; }
+               );
        }
 
        public function execute() {