Merge "Add DROP INDEX support to DatabaseSqlite::replaceVars method"
[lhc/web/wiklou.git] / tests / phpunit / includes / debug / MWDebugTest.php
index bd2c388..df73000 100644 (file)
@@ -7,7 +7,7 @@ class MWDebugTest extends MediaWikiTestCase {
                parent::setUp();
                // Make sure MWDebug class is enabled
                static $MWDebugEnabled = false;
-               if( !$MWDebugEnabled ) {
+               if ( !$MWDebugEnabled ) {
                        MWDebug::init();
                        $MWDebugEnabled = true;
                }
@@ -21,29 +21,40 @@ class MWDebugTest extends MediaWikiTestCase {
                parent::tearDown();
        }
 
-       function testAddLog() {
+       /**
+        * @covers MWDebug::log
+        */
+       public function testAddLog() {
                MWDebug::log( 'logging a string' );
-               $this->assertEquals( array( array(
-                       'msg' => 'logging a string',
-                       'type' => 'log',
-                       'caller' => __METHOD__ ,
+               $this->assertEquals(
+                       array( array(
+                               'msg' => 'logging a string',
+                               'type' => 'log',
+                               'caller' => __METHOD__,
                        ) ),
                        MWDebug::getLog()
                );
        }
 
-       function testAddWarning() {
+       /**
+        * @covers MWDebug::warning
+        */
+       public function testAddWarning() {
                MWDebug::warning( 'Warning message' );
-               $this->assertEquals( array( array(
-                       'msg' => 'Warning message',
-                       'type' => 'warn',
-                       'caller' => 'MWDebugTest::testAddWarning',
+               $this->assertEquals(
+                       array( array(
+                               'msg' => 'Warning message',
+                               'type' => 'warn',
+                               'caller' => 'MWDebugTest::testAddWarning',
                        ) ),
                        MWDebug::getLog()
                );
        }
 
-       function testAvoidDuplicateDeprecations() {
+       /**
+        * @covers MWDebug::deprecated
+        */
+       public function testAvoidDuplicateDeprecations() {
                MWDebug::deprecated( 'wfOldFunction', '1.0', 'component' );
                MWDebug::deprecated( 'wfOldFunction', '1.0', 'component' );
 
@@ -54,7 +65,10 @@ class MWDebugTest extends MediaWikiTestCase {
                );
        }
 
-       function testAvoidNonConsecutivesDuplicateDeprecations() {
+       /**
+        * @covers MWDebug::deprecated
+        */
+       public function testAvoidNonConsecutivesDuplicateDeprecations() {
                MWDebug::deprecated( 'wfOldFunction', '1.0', 'component' );
                MWDebug::warning( 'some warning' );
                MWDebug::log( 'we could have logged something too' );