X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialJavaScriptTest.php;h=03b368887f13506ae01cc214d7fd713bcfa09eff;hb=9c00b728ccc4ff8227adf676ca0b98f3b003dfaa;hp=57d314f4433b16414b862a416883aab1cde896a6;hpb=adbadb9ee62284d70d9e7763379ab3b4eb6bde6f;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialJavaScriptTest.php b/includes/specials/SpecialJavaScriptTest.php index 57d314f443..03b368887f 100644 --- a/includes/specials/SpecialJavaScriptTest.php +++ b/includes/specials/SpecialJavaScriptTest.php @@ -25,13 +25,12 @@ * @ingroup SpecialPage */ class SpecialJavaScriptTest extends SpecialPage { - /** - * @var $frameworks Array: Mapping of framework ids and their initilizer methods + * @var array Mapping of framework ids and their initilizer methods * in this class. If a framework is requested but not in this array, * the 'unknownframework' error is served. */ - static $frameworks = array( + private static $frameworks = array( 'qunit' => 'initQUnitTesting', ); @@ -139,7 +138,7 @@ class SpecialJavaScriptTest extends SpecialPage { $out = $this->getOutput(); - $out->addModules( 'mediawiki.tests.qunit.testrunner' ); + $out->addModules( 'test.mediawiki.qunit.testrunner' ); $qunitTestModules = $out->getResourceLoader()->getTestModuleNames( 'qunit' ); $out->addModules( $qunitTestModules ); @@ -174,6 +173,21 @@ HTML; ); } + /** + * Return an array of subpages beginning with $search that this special page will accept. + * + * @param string $search Prefix to search for + * @param integer $limit Maximum number of results to return + * @return string[] Matching subpages + */ + public function prefixSearchSubpages( $search, $limit = 10 ) { + return self::prefixSearchArray( + $search, + $limit, + array_keys( self::$frameworks ) + ); + } + protected function getGroupName() { return 'other'; }