MediaWiki  REL1_22
TimestampTest Class Reference

Tests timestamp parsing and output. More...

Inheritance diagram for TimestampTest:
Collaboration diagram for TimestampTest:

List of all members.

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.

Detailed Description

Tests timestamp parsing and output.

Definition at line 6 of file TimestampTest.php.


Member Function Documentation

Definition at line 107 of file TimestampTest.php.

References array().

Definition at line 236 of file TimestampTest.php.

References array().

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.

References $user, and any.

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.

References $user, and any.

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.


The documentation for this class was generated from the following file: