Merge "Fix variable name to match code"
[lhc/web/wiklou.git] / tests / phpunit / includes / config / ConfigFactoryTest.php
index 608d8d9..c0e51d7 100644 (file)
@@ -22,6 +22,15 @@ class ConfigFactoryTest extends MediaWikiTestCase {
                $factory->register( 'invalid', 'Invalid callback' );
        }
 
+       /**
+        * @covers ConfigFactory::register
+        */
+       public function testRegisterInvalidInstance() {
+               $factory = new ConfigFactory();
+               $this->setExpectedException( InvalidArgumentException::class );
+               $factory->register( 'invalidInstance', new stdClass );
+       }
+
        /**
         * @covers ConfigFactory::register
         */