MediaWiki
REL1_21
|
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 | |
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. | |
Protected Member Functions | |
setUp () | |
setup a basic parser object | |
tearDown () | |
destroy parser (TODO: is it really neded?) | |
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 201 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 171 of file MagicVariableTest.php.
References $value, 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 161 of file MagicVariableTest.php.
References $value, and assertMagicPadding().
PUBLIC MagicVariableTest::assertZeroPadded | ( | $ | magic, |
$ | value | ||
) |
assertion helper expecting a magic output which is zero padded
Definition at line 156 of file MagicVariableTest.php.
References $value, and assertMagicPadding().
MagicVariableTest::setParserTS | ( | $ | ts | ) | [private] |
helper to set the parser timestamp and revision timestamp
Definition at line 193 of file MagicVariableTest.php.
Referenced by assertMagicPadding().
MagicVariableTest::setUp | ( | ) | [protected] |
setup a basic parser object
Reimplemented from MediaWikiTestCase.
Definition at line 32 of file MagicVariableTest.php.
References $title, array(), check, connection, Language\factory(), it, Title\newFromText(), ParserOptions\newFromUserAndLang(), and MediaWikiTestCase\setMwGlobals().
MagicVariableTest::tearDown | ( | ) | [protected] |
destroy parser (TODO: is it really neded?)
Reimplemented from MediaWikiTestCase.
Definition at line 55 of file MagicVariableTest.php.
Definition at line 69 of file MagicVariableTest.php.
Definition at line 74 of file MagicVariableTest.php.
Definition at line 91 of file MagicVariableTest.php.
Definition at line 96 of file MagicVariableTest.php.
Definition at line 79 of file MagicVariableTest.php.
Definition at line 84 of file MagicVariableTest.php.
Definition at line 101 of file MagicVariableTest.php.
Definition at line 106 of file MagicVariableTest.php.
Definition at line 114 of file MagicVariableTest.php.
Definition at line 119 of file MagicVariableTest.php.
Definition at line 126 of file MagicVariableTest.php.
Definition at line 131 of file MagicVariableTest.php.
Rough tests for {{SERVERNAME}} magic word Bug 31176.
Definition at line 139 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.