From: Tim Starling Date: Fri, 31 Aug 2018 00:45:34 +0000 (+1000) Subject: Fix wfDebug() test so that it works with overridden SPI X-Git-Tag: 1.34.0-rc.0~4232^2 X-Git-Url: http://git.cyclocoop.org/%22.%24image2.%22?a=commitdiff_plain;h=6d1ea3e057714623598ca187496acc2bf3336659;p=lhc%2Fweb%2Fwiklou.git Fix wfDebug() test so that it works with overridden SPI Fix testDebugFunctionTest() so that it works when LocalSettings.php sets $wgMWLoggerDefaultSpi Change-Id: I5e573b0ce1ce037c3505d3b44d9710395c9af8d6 --- diff --git a/tests/phpunit/includes/GlobalFunctions/GlobalTest.php b/tests/phpunit/includes/GlobalFunctions/GlobalTest.php index ee4819fa5a..32c190edaa 100644 --- a/tests/phpunit/includes/GlobalFunctions/GlobalTest.php +++ b/tests/phpunit/includes/GlobalFunctions/GlobalTest.php @@ -1,5 +1,7 @@ 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 ) );