createMock( RevisionLookup::class ); $repo = new MediaWikiGadgetsDefinitionRepo( $wanCache, $revLookup ); return $repo->newFromDefinition( $line, 'misc' ); } public function makeGadgetModule( Gadget $g ) { $module = TestingAccessWrapper::newFromObject( new GadgetResourceLoaderModule( [ 'id' => null ] ) ); $module->gadget = $g; return $module; } }