MediaWiki REL1_28
|
Tests timestamp parsing and output. More...
Public Member Functions | |
testConstructWithNoTimestamp () | |
ConvertibleTimestamp::__construct. | |
testConvert ( $format, $expected, $original) | |
provideValidTimestamps ConvertibleTimestamp::convert | |
testConvertInvalid () | |
Format an invalid timestamp. | |
testDiff ( $timestamp1, $timestamp2, $expected) | |
provideValidTimestampDifferences ConvertibleTimestamp::diff | |
testInvalidOutput () | |
Test requesting an invalid output format. | |
testInvalidParse () | |
Test an invalid timestamp. | |
testOutOfRangeTimestamps ( $format, $input) | |
Test an out of range timestamp provideOutOfRangeTimestamps TimestampException ConvertibleTimestamp. | |
testToString () | |
ConvertibleTimestamp::__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 | provideOutOfRangeTimestamps () |
Returns a list of out of range timestamps in the format: [ type, timestamp_of_type ]. | |
static | provideValidTimestampDifferences () |
static | provideValidTimestamps () |
Returns a list of valid timestamps in the format: [ type, timestamp_of_type, timestamp_in_MW ]. | |
Tests timestamp parsing and output.
Definition at line 6 of file ConvertibleTimestampTest.php.
|
static |
Returns a list of out of range timestamps in the format: [ type, timestamp_of_type ].
Definition at line 137 of file ConvertibleTimestampTest.php.
References TS_MW.
|
static |
Definition at line 25 of file ConvertibleTimestampTest.php.
|
static |
Returns a list of valid timestamps in the format: [ type, timestamp_of_type, timestamp_in_MW ].
Definition at line 115 of file ConvertibleTimestampTest.php.
References TS_DB, TS_EXIF, TS_ISO_8601, TS_ISO_8601_BASIC, TS_MW, TS_ORACLE, TS_POSTGRES, TS_RFC2822, and TS_UNIX.
ConvertibleTimestampTest::testConstructWithNoTimestamp | ( | ) |
ConvertibleTimestamp::__construct.
Definition at line 10 of file ConvertibleTimestampTest.php.
References $timestamp, and TS_MW.
ConvertibleTimestampTest::testConvert | ( | $format, | |
$expected, | |||
$original | |||
) |
provideValidTimestamps ConvertibleTimestamp::convert
Definition at line 78 of file ConvertibleTimestampTest.php.
References ConvertibleTimestamp\convert().
ConvertibleTimestampTest::testConvertInvalid | ( | ) |
Format an invalid timestamp.
Definition at line 86 of file ConvertibleTimestampTest.php.
References ConvertibleTimestamp\convert().
ConvertibleTimestampTest::testDiff | ( | $timestamp1, | |
$timestamp2, | |||
$expected | |||
) |
provideValidTimestampDifferences ConvertibleTimestamp::diff
Definition at line 38 of file ConvertibleTimestampTest.php.
ConvertibleTimestampTest::testInvalidOutput | ( | ) |
Test requesting an invalid output format.
TimestampException ConvertibleTimestamp::getTimestamp
Definition at line 106 of file ConvertibleTimestampTest.php.
References $timestamp.
ConvertibleTimestampTest::testInvalidParse | ( | ) |
Test an invalid timestamp.
TimestampException ConvertibleTimestamp
Definition at line 70 of file ConvertibleTimestampTest.php.
ConvertibleTimestampTest::testOutOfRangeTimestamps | ( | $format, | |
$input | |||
) |
Test an out of range timestamp provideOutOfRangeTimestamps TimestampException ConvertibleTimestamp.
Definition at line 96 of file ConvertibleTimestampTest.php.
References $timestamp.
ConvertibleTimestampTest::testToString | ( | ) |
ConvertibleTimestamp::__toString.
Definition at line 20 of file ConvertibleTimestampTest.php.
References $timestamp.
ConvertibleTimestampTest::testValidOutput | ( | $format, | |
$expected, | |||
$original | |||
) |
Test outputting valid timestamps to different formats.
provideValidTimestamps ConvertibleTimestamp::getTimestamp
Definition at line 60 of file ConvertibleTimestampTest.php.
References $timestamp.
ConvertibleTimestampTest::testValidParse | ( | $format, | |
$original, | |||
$expected | |||
) |
Test parsing of valid timestamps and outputing to MW format.
provideValidTimestamps ConvertibleTimestamp::getTimestamp
Definition at line 50 of file ConvertibleTimestampTest.php.
References $timestamp, and TS_MW.