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


Public Member Functions | |
| provideValidTimestampDifferences () | |
| testConstructWithNoTimestamp () | |
| MWTimestamp::__construct | |
| testDiff ($timestamp1, $timestamp2, $expected) | |
| provideValidTimestampDifferences MWTimestamp::diff | |
| 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 | |
| testToString () | |
| MWTimestamp::__toString | |
| 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 () | |
Tests timestamp parsing and output.
Definition at line 6 of file MWTimestampTest.php.
| static MWTimestampTest::provideHumanTimestampTests | ( | ) | [static] |
Definition at line 145 of file MWTimestampTest.php.
References array().
| static MWTimestampTest::provideRelativeTimestampTests | ( | ) | [static] |
Definition at line 274 of file MWTimestampTest.php.
References array().
Definition at line 32 of file MWTimestampTest.php.
References array().
| static MWTimestampTest::provideValidTimestamps | ( | ) | [static] |
Returns a list of valid timestamps in the format: array( type, timestamp_of_type, timestamp_in_MW )
Definition at line 95 of file MWTimestampTest.php.
References array().
| MWTimestampTest::setUp | ( | ) | [protected] |
Reimplemented from MediaWikiLangTestCase.
Definition at line 8 of file MWTimestampTest.php.
References Language\factory(), and RequestContext\getMain().
| MWTimestampTest::testDiff | ( | $ | timestamp1, |
| $ | timestamp2, | ||
| $ | expected | ||
| ) |
provideValidTimestampDifferences MWTimestamp::diff
Definition at line 45 of file MWTimestampTest.php.
| MWTimestampTest::testHumanTimestamp | ( | $ | tsTime, |
| $ | currentTime, | ||
| $ | timeCorrection, | ||
| $ | dateFormat, | ||
| $ | expectedOutput, | ||
| $ | desc | ||
| ) |
provideHumanTimestampTests MWTimestamp::getHumanTimestamp
Definition at line 117 of file MWTimestampTest.php.
Test requesting an invalid output format.
TimestampException MWTimestamp::getTimestamp
Definition at line 86 of file MWTimestampTest.php.
References $timestamp.
Test an invalid timestamp.
TimestampException MWTimestamp
Definition at line 77 of file MWTimestampTest.php.
| MWTimestampTest::testRelativeTimestamp | ( | $ | tsTime, |
| $ | currentTime, | ||
| $ | timeCorrection, | ||
| $ | dateFormat, | ||
| $ | expectedOutput, | ||
| $ | desc | ||
| ) |
provideRelativeTimestampTests MWTimestamp::getRelativeTimestamp
Definition at line 250 of file MWTimestampTest.php.
| MWTimestampTest::testValidOutput | ( | $ | format, |
| $ | expected, | ||
| $ | original | ||
| ) |
Test outputting valid timestamps to different formats.
provideValidTimestamps MWTimestamp::getTimestamp
Definition at line 67 of file MWTimestampTest.php.
References $timestamp.
| MWTimestampTest::testValidParse | ( | $ | format, |
| $ | original, | ||
| $ | expected | ||
| ) |
Test parsing of valid timestamps and outputing to MW format.
provideValidTimestamps MWTimestamp::getTimestamp
Definition at line 57 of file MWTimestampTest.php.
References $timestamp.