|
MediaWiki
REL1_22
|
Tests timestamp parsing and output. More...


Public Member Functions | |
| testHumanTimestamp ($tsTime, $currentTime, $timeCorrection, $dateFormat, $expectedOutput, $desc) | |
| provideHumanTimestampTests MWTimestamp::getHumanTimestamp | |
| testInvalidOutput () | |
| Test requesting an invalid output format. | |
| testInvalidParse () | |
| Test an invalid timestamp. | |
| testRelativeTimestamp ($tsTime, $currentTime, $timeCorrection, $dateFormat, $expectedOutput, $desc) | |
| provideRelativeTimestampTests MWTimestamp::getRelativeTimestamp | |
| testValidOutput ($format, $expected, $original) | |
| Test outputting valid timestamps to different formats. | |
| testValidParse ($format, $original, $expected) | |
| Test parsing of valid timestamps and outputing to MW format. | |
Static Public Member Functions | |
| static | provideHumanTimestampTests () |
| static | provideRelativeTimestampTests () |
| static | provideValidTimestamps () |
| Returns a list of valid timestamps in the format: array( type, timestamp_of_type, timestamp_in_MW ) | |
Protected Member Functions | |
| setUp () | |
| setUp and tearDown should (where significant) happen in reverse order. | |
Tests timestamp parsing and output.
Definition at line 6 of file TimestampTest.php.
| static TimestampTest::provideHumanTimestampTests | ( | ) | [static] |
Definition at line 107 of file TimestampTest.php.
References array().
| static TimestampTest::provideRelativeTimestampTests | ( | ) | [static] |
Definition at line 236 of file TimestampTest.php.
References array().
| static TimestampTest::provideValidTimestamps | ( | ) | [static] |
Returns a list of valid timestamps in the format: array( type, timestamp_of_type, timestamp_in_MW )
Definition at line 57 of file TimestampTest.php.
References array().
| TimestampTest::setUp | ( | ) | [protected] |
setUp and tearDown should (where significant) happen in reverse order.
Reimplemented from MediaWikiLangTestCase.
Definition at line 8 of file TimestampTest.php.
References Language\factory(), and RequestContext\getMain().
| TimestampTest::testHumanTimestamp | ( | $ | tsTime, |
| $ | currentTime, | ||
| $ | timeCorrection, | ||
| $ | dateFormat, | ||
| $ | expectedOutput, | ||
| $ | desc | ||
| ) |
provideHumanTimestampTests MWTimestamp::getHumanTimestamp
Definition at line 79 of file TimestampTest.php.
Test requesting an invalid output format.
TimestampException MWTimestamp::getTimestamp
Definition at line 48 of file TimestampTest.php.
References $timestamp.
Test an invalid timestamp.
TimestampException MWTimestamp
Definition at line 39 of file TimestampTest.php.
| TimestampTest::testRelativeTimestamp | ( | $ | tsTime, |
| $ | currentTime, | ||
| $ | timeCorrection, | ||
| $ | dateFormat, | ||
| $ | expectedOutput, | ||
| $ | desc | ||
| ) |
provideRelativeTimestampTests MWTimestamp::getRelativeTimestamp
Definition at line 212 of file TimestampTest.php.
| TimestampTest::testValidOutput | ( | $ | format, |
| $ | expected, | ||
| $ | original | ||
| ) |
Test outputting valid timestamps to different formats.
provideValidTimestamps MWTimestamp::getTimestamp
Definition at line 29 of file TimestampTest.php.
References $timestamp.
| TimestampTest::testValidParse | ( | $ | format, |
| $ | original, | ||
| $ | expected | ||
| ) |
Test parsing of valid timestamps and outputing to MW format.
provideValidTimestamps MWTimestamp::getTimestamp
Definition at line 19 of file TimestampTest.php.
References $timestamp.