Merge "StringUtils: Add a utility for checking if a string is a valid regex"
[lhc/web/wiklou.git] / tests / phpunit / includes / api / format / ApiFormatBaseTest.php
index 03359f8..286e8a8 100644 (file)
@@ -365,13 +365,19 @@ class ApiFormatBaseTest extends ApiFormatTestBase {
                $main = new ApiMain( $context );
                $printer = $this->getMockFormatter( $main, 'mockfm' );
                $mm = $printer->getMain()->getModuleManager();
-               $mm->addModule( 'mockfm', 'format', ApiFormatBase::class, function () {
-                       return $mock;
-               } );
-               if ( $registerNonHtml ) {
-                       $mm->addModule( 'mock', 'format', ApiFormatBase::class, function () {
+               $mm->addModule( 'mockfm', 'format', [
+                       'class' => ApiFormatBase::class,
+                       'factory' => function () {
                                return $mock;
-                       } );
+                       }
+               ] );
+               if ( $registerNonHtml ) {
+                       $mm->addModule( 'mock', 'format', [
+                               'class' => ApiFormatBase::class,
+                               'factory' => function () {
+                                       return $mock;
+                               }
+                       ] );
                }
 
                $printer->initPrinter();