Merge "Add SPARQL client to core"
[lhc/web/wiklou.git] / maintenance / Maintenance.php
index 86336cf..617071b 100644 (file)
@@ -414,7 +414,10 @@ abstract class Maintenance {
                        $this->fatalError( $err, intval( $die ) );
                }
                $this->outputChanneled( false );
-               if ( PHP_SAPI == 'cli' || PHP_SAPI == 'phpdbg' ) {
+               if (
+                       ( PHP_SAPI == 'cli' || PHP_SAPI == 'phpdbg' ) &&
+                       !defined( 'MW_PHPUNIT_TEST' )
+               ) {
                        fwrite( STDERR, $err . "\n" );
                } else {
                        print $err;
@@ -1153,9 +1156,9 @@ abstract class Maintenance {
 
                $wgShowSQLErrors = true;
 
-               MediaWiki\suppressWarnings();
+               Wikimedia\suppressWarnings();
                set_time_limit( 0 );
-               MediaWiki\restoreWarnings();
+               Wikimedia\restoreWarnings();
 
                $this->adjustMemoryLimit();
        }