X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialJavaScriptTest.php;h=65ddb31b8ec5f1803e11d003516b71b602de4a44;hb=0e9f24a169fdb9b9eead67d555743319dea503d7;hp=03b368887f13506ae01cc214d7fd713bcfa09eff;hpb=5141b5753b2add7b9f66baa8852f11f1648a9ac3;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialJavaScriptTest.php b/includes/specials/SpecialJavaScriptTest.php index 03b368887f..65ddb31b8e 100644 --- a/includes/specials/SpecialJavaScriptTest.php +++ b/includes/specials/SpecialJavaScriptTest.php @@ -134,8 +134,6 @@ class SpecialJavaScriptTest extends SpecialPage { * Initialize the page for QUnit. */ private function initQUnitTesting() { - global $wgJavaScriptTestConfig; - $out = $this->getOutput(); $out->addModules( 'test.mediawiki.qunit.testrunner' ); @@ -143,7 +141,7 @@ class SpecialJavaScriptTest extends SpecialPage { $out->addModules( $qunitTestModules ); $summary = $this->msg( 'javascripttest-qunit-intro' ) - ->params( $wgJavaScriptTestConfig['qunit']['documentation'] ) + ->params( 'https://www.mediawiki.org/wiki/Manual:JavaScript_unit_testing' ) ->parseAsBlock(); $header = $this->msg( 'javascripttest-qunit-heading' )->escaped(); $userDir = $this->getLanguage()->getDir(); @@ -161,31 +159,18 @@ HTML; $out->addHtml( $this->wrapSummaryHtml( $summary, 'frameworkfound' ) . $baseHtml ); // This special page is disabled by default ($wgEnableJavaScriptTest), and contains - // no sensitive data. In order to allow TestSwarm to embed it into a test client window, + // no sensitive data. In order to allow test frameworks to embed it into a test client window, // we need to allow iframing of this page. $out->allowClickjacking(); - - // Used in ./tests/qunit/data/testrunner.js, see also documentation of - // $wgJavaScriptTestConfig in DefaultSettings.php - $out->addJsConfigVars( - 'QUnitTestSwarmInjectJSPath', - $wgJavaScriptTestConfig['qunit']['testswarm-injectjs'] - ); } /** - * Return an array of subpages beginning with $search that this special page will accept. + * Return an array of subpages 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 + * @return string[] subpages */ - public function prefixSearchSubpages( $search, $limit = 10 ) { - return self::prefixSearchArray( - $search, - $limit, - array_keys( self::$frameworks ) - ); + public function getSubpagesForPrefixSearch() { + return array_keys( self::$frameworks ); } protected function getGroupName() {