newFromDefinition( $line, 'misc' ); return $g; } public static function makeGadgetModule( Gadget $g ) { $module = TestingAccessWrapper::newFromObject( new GadgetResourceLoaderModule( [ 'id' => null ] ) ); $module->gadget = $g; return $module; } }