Add more wfDebug tests
authorX! <soxred93@users.mediawiki.org>
Sun, 2 Jan 2011 02:33:07 +0000 (02:33 +0000)
committerX! <soxred93@users.mediawiki.org>
Sun, 2 Jan 2011 02:33:07 +0000 (02:33 +0000)
tests/phpunit/includes/GlobalTest.php

index 104d4f2..1cc3b31 100644 (file)
@@ -510,12 +510,19 @@ class GlobalTest extends MediaWikiTestCase {
                        $this->assertTrue( false, 'MockOutputPage was not called.' );
                }
                
+               $wgOut = $old_wgOut;
+               $wgShowDebug = $old_wgShowDebug;                
                unlink( $wgDebugLogFile );
                
                
-               $wgOut = $old_wgOut;
-               $wgShowDebug = $old_wgShowDebug;
-
+               
+               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 );