MediaWiki
REL1_19
|
Public Member Functions | |
PUBLIC | assertUnPadded ($magic, $value) |
assertion helper expecting a magic output which is unpadded | |
PUBLIC | assertZeroPadded ($magic, $value) |
assertion helper expecting a magic output which is zero padded | |
setUp () | |
setup a basic parser object | |
tearDown () | |
destroy parser (TODO: is it really neded?) | |
testCurrentdayIsUnPadded ($day) | |
MediaWikiProvide::Days | |
testCurrentdaytwoIsZeroPadded ($day) | |
MediaWikiProvide::Days | |
testCurrentmonthIsZeroPadded ($month) | |
MediaWikiProvide::Months | |
testCurrentmonthoneIsUnPadded ($month) | |
MediaWikiProvide::Months | |
testLocaldayIsUnPadded ($day) | |
MediaWikiProvide::Days | |
testLocaldaytwoIsZeroPadded ($day) | |
MediaWikiProvide::Days | |
testLocalmonthIsZeroPadded ($month) | |
MediaWikiProvide::Months | |
testLocalmonthoneIsUnPadded ($month) | |
MediaWikiProvide::Months | |
testRevisiondayIsUnPadded ($day) | |
MediaWikiProvide::Days | |
testRevisiondaytwoIsZeroPadded ($day) | |
MediaWikiProvide::Days | |
testRevisionmonthIsZeroPadded ($month) | |
MediaWikiProvide::Months | |
testRevisionmonthoneIsUnPadded ($month) | |
MediaWikiProvide::Months | |
testServernameFromDifferentProtocols () | |
Rough tests for {{SERVERNAME}} magic word Bug 31176. | |
Private Member Functions | |
assertMagic ($expected, $magic) | |
Assertion helper to test a magic variable output. | |
assertMagicPadding ($magic, $value, $format) | |
Main assertion helper for magic variables padding. | |
setParserTS ($ts) | |
helper to set the parser timestamp and revision timestamp | |
Private Attributes | |
$expectedAsInteger | |
An array of magicword returned as type integer by the parser They are usually returned as a string for i18n since we support persan numbers for example, but some magic explicitly return them as integer. | |
$testParser = null | |
Will contains a parser object. |
Definition at line 15 of file MagicVariableTest.php.
MagicVariableTest::assertMagic | ( | $ | expected, |
$ | magic | ||
) | [private] |
Assertion helper to test a magic variable output.
Definition at line 183 of file MagicVariableTest.php.
Referenced by assertMagicPadding().
MagicVariableTest::assertMagicPadding | ( | $ | magic, |
$ | value, | ||
$ | format | ||
) | [private] |
Main assertion helper for magic variables padding.
$magic | string Magic variable name |
$value | mixed Month or day |
$format | string sprintf format for $value |
Definition at line 156 of file MagicVariableTest.php.
References assertMagic(), and setParserTS().
Referenced by assertUnPadded(), and assertZeroPadded().
PUBLIC MagicVariableTest::assertUnPadded | ( | $ | magic, |
$ | value | ||
) |
assertion helper expecting a magic output which is unpadded
Definition at line 146 of file MagicVariableTest.php.
References assertMagicPadding().
PUBLIC MagicVariableTest::assertZeroPadded | ( | $ | magic, |
$ | value | ||
) |
assertion helper expecting a magic output which is zero padded
Definition at line 141 of file MagicVariableTest.php.
References assertMagicPadding().
MagicVariableTest::setParserTS | ( | $ | ts | ) | [private] |
helper to set the parser timestamp and revision timestamp
Definition at line 175 of file MagicVariableTest.php.
Referenced by assertMagicPadding().
setup a basic parser object
Definition at line 32 of file MagicVariableTest.php.
References $title, $wgContLang, Language\factory(), and Title\newFromText().
destroy parser (TODO: is it really neded?)
Definition at line 50 of file MagicVariableTest.php.
Definition at line 62 of file MagicVariableTest.php.
Definition at line 66 of file MagicVariableTest.php.
Definition at line 81 of file MagicVariableTest.php.
Definition at line 85 of file MagicVariableTest.php.
Definition at line 70 of file MagicVariableTest.php.
Definition at line 74 of file MagicVariableTest.php.
Definition at line 89 of file MagicVariableTest.php.
Definition at line 93 of file MagicVariableTest.php.
Definition at line 101 of file MagicVariableTest.php.
Definition at line 105 of file MagicVariableTest.php.
Definition at line 112 of file MagicVariableTest.php.
Definition at line 116 of file MagicVariableTest.php.
Rough tests for {{SERVERNAME}} magic word Bug 31176.
Definition at line 124 of file MagicVariableTest.php.
MagicVariableTest::$expectedAsInteger [private] |
array( 'revisionday', 'revisionmonth1', )
An array of magicword returned as type integer by the parser They are usually returned as a string for i18n since we support persan numbers for example, but some magic explicitly return them as integer.
Definition at line 26 of file MagicVariableTest.php.
MagicVariableTest::$testParser = null [private] |
Will contains a parser object.
Definition at line 17 of file MagicVariableTest.php.