Merge "Fix wfDebug() test so that it works with overridden SPI"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 31 Aug 2018 20:42:43 +0000 (20:42 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 31 Aug 2018 20:42:43 +0000 (20:42 +0000)
tests/phpunit/includes/GlobalFunctions/GlobalTest.php

index ee4819f..32c190e 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
+use MediaWiki\Logger\LegacyLogger;
+
 /**
  * @group Database
  * @group GlobalFunctions
@@ -325,8 +327,9 @@ class GlobalTest extends MediaWikiTestCase {
                $this->setMwGlobals( [
                        'wgDebugLogFile' => $debugLogFile,
                        #  @todo FIXME: $wgDebugTimestamps should be tested
-                       'wgDebugTimestamps' => false
+                       'wgDebugTimestamps' => false,
                ] );
+               $this->setLogger( 'wfDebug', new LegacyLogger( 'wfDebug' ) );
 
                wfDebug( "This is a normal string" );
                $this->assertEquals( "This is a normal string\n", file_get_contents( $debugLogFile ) );