Go to the documentation of this file.
35 'qunit' =>
'initQUnitTesting',
39 parent::__construct(
'JavaScriptTest' );
46 $out->disallowUserJs();
48 $out->addModules(
'mediawiki.special.javaScriptTest' );
51 $pars = explode(
'/', $par );
52 $framework = strtolower( $pars[0] );
56 $out->setPageTitle( $this->
msg(
'javascripttest' ) );
58 $this->
msg(
'javascripttest-pagetext-noframework' )->escaped() .
63 } elseif ( isset( self::$frameworks[$framework] ) ) {
66 'javascripttest-title',
68 $this->
msg(
"javascripttest-$framework-name" )->plain()
70 $out->setSubtitle( $this->
msg(
'javascripttest-backlink' )
72 $this->{self::$frameworks[$framework]}();
75 $out->setPageTitle( $this->
msg(
'javascripttest' ) );
78 $this->
msg(
'javascripttest-pagetext-unknownframework', $par )->escaped() .
95 foreach ( self::$frameworks
as $framework => $initFn ) {
102 $this->
msg(
"javascripttest-$framework-name" )->escaped()
108 return $this->
msg(
'javascripttest-pagetext-frameworks' )->rawParams( $list )
122 $validStates =
array(
'noframework',
'unknownframework',
'frameworkfound' );
124 if ( !in_array( $state, $validStates ) ) {
126 .
' given an invalid state. Must be one of "'
127 . join(
'", "', $validStates ) .
'".'
131 return "<div id=\"mw-javascripttest-summary\" class=\"mw-javascripttest-$state\">$html</div>";
138 global $wgJavaScriptTestConfig;
142 $out->addModules(
'test.mediawiki.qunit.testrunner' );
143 $qunitTestModules =
$out->getResourceLoader()->getTestModuleNames(
'qunit' );
144 $out->addModules( $qunitTestModules );
146 $summary = $this->
msg(
'javascripttest-qunit-intro' )
147 ->params( $wgJavaScriptTestConfig[
'qunit'][
'documentation'] )
149 $header = $this->
msg(
'javascripttest-qunit-heading' )->escaped();
153 <div
class=
"mw-content-ltr">
154 <div
id=
"qunit-header"><span dir=
"$userDir">$header</span></div>
155 <div
id=
"qunit-banner"></div>
156 <div
id=
"qunit-testrunner-toolbar"></div>
157 <div
id=
"qunit-userAgent"></div>
158 <ol
id=
"qunit-tests"></ol>
159 <div
id=
"qunit-fixture">test markup,
will be hidden</div>
167 $out->allowClickjacking();
171 $out->addJsConfigVars(
172 'QUnitTestSwarmInjectJSPath',
173 $wgJavaScriptTestConfig[
'qunit'][
'testswarm-injectjs']
getPageTitle( $subpage=false)
Get a self-referential title object.
execute( $par)
Default execute method Checks user permissions, calls the function given in mFunction.
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses & $html
getOutput()
Get the OutputPage being used for this instance.
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
getLanguage()
Shortcut to get user's language.
wrapSummaryHtml( $html, $state)
Function to wrap the summary.
static linkKnown( $target, $html=null, $customAttribs=array(), $query=array(), $options=array( 'known', 'noclasses'))
Identical to link(), except $options defaults to 'known'.
static link( $target, $html=null, $customAttribs=array(), $query=array(), $options=array())
This function returns an HTML link to the given target.
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
when a variable name is used in a it is silently declared as a new masking the global
</td >< td > &</td >< td > t want your writing to be edited mercilessly and redistributed at will
msg()
Wrapper around wfMessage that sets the current context.
Parent class for all special pages.
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
initQUnitTesting()
Initialize the page for QUnit.
static rawElement( $element, $attribs=array(), $contents='')
Returns an HTML element in a string.
getFrameworkListHtml()
Get a list of frameworks (including introduction paragraph and links to the framework run pages)