MediaWiki
master
|
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 187 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 160 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 150 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 145 of file MagicVariableTest.php.
References $value, and assertMagicPadding().
MagicVariableTest::setParserTS | ( | $ | ts | ) | [private] |
helper to set the parser timestamp and revision timestamp
Definition at line 179 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, 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 52 of file MagicVariableTest.php.
Definition at line 66 of file MagicVariableTest.php.
Definition at line 70 of file MagicVariableTest.php.
Definition at line 85 of file MagicVariableTest.php.
Definition at line 89 of file MagicVariableTest.php.
Definition at line 74 of file MagicVariableTest.php.
Definition at line 78 of file MagicVariableTest.php.
Definition at line 93 of file MagicVariableTest.php.
Definition at line 97 of file MagicVariableTest.php.
Definition at line 105 of file MagicVariableTest.php.
Definition at line 109 of file MagicVariableTest.php.
Definition at line 116 of file MagicVariableTest.php.
Definition at line 120 of file MagicVariableTest.php.
Rough tests for {{SERVERNAME}} magic word Bug 31176.
Definition at line 128 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.