Merge "Deprecate ORMTable::getFieldPrefix"
[lhc/web/wiklou.git] / tests / phpunit / maintenance / MaintenanceTest.php
index 42d1d0b..e2fc824 100644 (file)
@@ -81,7 +81,7 @@ class MaintenanceFixup extends Maintenance {
                        return;
                }
 
-               return call_user_func_array( array( "parent", __FUNCTION__ ), func_get_args() );
+               call_user_func_array( array( "parent", __FUNCTION__ ), func_get_args() );
        }
 
        /**
@@ -810,4 +810,21 @@ class MaintenanceTest extends MediaWikiTestCase {
                $m2->simulateShutdown();
                $this->assertOutputPrePostShutdown( "foobar\n\n", false );
        }
+
+       /**
+        * @covers Maintenance::getConfig
+        */
+       public function testGetConfig() {
+               $this->assertInstanceOf( 'Config', $this->m->getConfig() );
+               $this->assertSame( ConfigFactory::getDefaultInstance()->makeConfig( 'main' ), $this->m->getConfig() );
+       }
+
+       /**
+        * @covers Maintenance::setConfig
+        */
+       public function testSetConfig() {
+               $conf = $this->getMock( 'Config' );
+               $this->m->setConfig( $conf );
+               $this->assertSame( $conf, $this->m->getConfig() );
+       }
 }