MediaWiki
REL1_22
|
This PHP script defines the spec that the mediawiki.jqueryMsg module should conform to. More...
Public Member Functions | |
__construct () | |
execute () | |
Static Public Attributes | |
static | $keyToTestArgs |
Private Member Functions | |
getMessagesAndTests () | |
writeJavascriptFile ($messages, $tests, $dataSpecFile) |
This PHP script defines the spec that the mediawiki.jqueryMsg module should conform to.
It does this by looking up the results of various kinds of string parsing, with various languages, in the current installation of MediaWiki. It then outputs a static specification, mapping expected inputs to outputs, which can be used fed into a unit test framework. (QUnit, Jasmine, anything, it just outputs an object with key/value pairs).
This is similar to Michael Dale ([email protected])'s parser tests, except that it doesn't look up the API results while doing the test, so the test run is much faster (at the cost of being out of date in rare circumstances. But mostly the parsing that we are doing in Javascript doesn't change much).
Definition at line 66 of file generateJqueryMsgData.php.
Reimplemented from Maintenance.
Definition at line 85 of file generateJqueryMsgData.php.
Reimplemented from Maintenance.
Definition at line 91 of file generateJqueryMsgData.php.
References $messages, getMessagesAndTests(), list, and writeJavascriptFile().
GenerateJqueryMsgData::getMessagesAndTests | ( | ) | [private] |
Definition at line 96 of file generateJqueryMsgData.php.
References $key, $messages, $result, array(), as, and wfMessage().
Referenced by execute().
GenerateJqueryMsgData::writeJavascriptFile | ( | $ | messages, |
$ | tests, | ||
$ | dataSpecFile | ||
) | [private] |
Definition at line 125 of file generateJqueryMsgData.php.
References $messages, $output, array(), and FormatJson\encode().
Referenced by execute().
GenerateJqueryMsgData::$keyToTestArgs [static] |