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