/** * Initialize/fetch the ApiMain instance for testing * @return ApiMain */ private static function getMain() { if (!self::$main) { self::$main = new ApiMain(RequestContext::getMain()); self::$main->getContext()->setLanguage('en'); } return self::$main; }
/** * Initialize/fetch the ApiMain instance for testing * @return ApiMain */ private static function getMain() { if (!self::$main) { self::$main = new ApiMain(RequestContext::getMain()); self::$main->getContext()->setLanguage('en'); self::$main->getContext()->setTitle(Title::makeTitle(NS_SPECIAL, 'Badtitle/dummy title for ApiDocumentationTest')); } return self::$main; }