/** * @param $g Gadget * @return array */ private function fakeMetadata(Gadget $g) { return array('settings' => array('rights' => $g->getRequiredRights(), 'skins' => $g->getRequiredSkins(), 'default' => $g->isOnByDefault(), 'hidden' => $g->isHidden(), 'shared' => false, 'category' => $g->getCategory(), 'legacyscripts' => (bool) $g->getLegacyScripts()), 'module' => array('scripts' => $g->getScripts(), 'styles' => $g->getStyles(), 'dependencies' => $g->getDependencies(), 'messages' => $g->getMessages())); }