restore wgDebugTimestamps in testDebugFunctionTest()
authorAntoine Musso <hashar@free.fr>
Mon, 15 Oct 2012 13:40:21 +0000 (15:40 +0200)
committerAntoine Musso <hashar@free.fr>
Mon, 15 Oct 2012 13:41:20 +0000 (15:41 +0200)
Change-Id: I362e398bb891618f3c79fe625ef6cf30d6929df9

tests/phpunit/includes/GlobalFunctions/GlobalTest.php

index 4d53d06..e8aabfd 100644 (file)
@@ -317,29 +317,28 @@ class GlobalTest extends MediaWikiTestCase {
                }
                
        }
-       
-       
+
+
        function testDebugFunctionTest() {
-       
+
                global $wgDebugLogFile, $wgDebugTimestamps;
-               
+
                $old_log_file = $wgDebugLogFile;
                $wgDebugLogFile = tempnam( wfTempDir(), 'mw-' );
-               # @todo FIXME: This setting should be tested
+               # @todo FIXME: $wgDebugTimestamps should be tested
+               $old_wgDebugTimestamps = $wgDebugTimestamps;
                $wgDebugTimestamps = false;
-               
-               
-               
+
+
                wfDebug( "This is a normal string" );
                $this->assertEquals( "This is a normal string", file_get_contents( $wgDebugLogFile ) );
                unlink( $wgDebugLogFile );
-               
-               
+
                wfDebug( "This is nöt an ASCII string" );
                $this->assertEquals( "This is nöt an ASCII string", file_get_contents( $wgDebugLogFile ) );
                unlink( $wgDebugLogFile );
-               
-               
+
+
                wfDebug( "\00305This has böth UTF and control chars\003" );
                $this->assertEquals( " 05This has böth UTF and control chars ", file_get_contents( $wgDebugLogFile ) );
                unlink( $wgDebugLogFile );
@@ -347,17 +346,16 @@ class GlobalTest extends MediaWikiTestCase {
                wfDebugMem();
                $this->assertGreaterThan( 5000, preg_replace( '/\D/', '', file_get_contents( $wgDebugLogFile ) ) );
                unlink( $wgDebugLogFile );
-               
+
                wfDebugMem(true);
                $this->assertGreaterThan( 5000000, preg_replace( '/\D/', '', file_get_contents( $wgDebugLogFile ) ) );
                unlink( $wgDebugLogFile );
-               
-               
-               
+
+
                $wgDebugLogFile = $old_log_file;
-               
+               $wgDebugTimestamps = $old_wgDebugTimestamps;
        }
-       
+
        function testClientAcceptsGzipTest() {
                
                $settings = array(