Support BCE / CE times
This commit is contained in:
@ -428,6 +428,42 @@ final class NodaTimeSplitterTest extends TestCase {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Test to check whether the HTML page is correctly generated.
|
||||
*
|
||||
* @author Joshua Ramon Enslin <joshua@museum-digital.de>
|
||||
* @group ValidOutput
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testSplitSimpleDatesEnglish():void {
|
||||
|
||||
$output = NodaTimeSplitter::attempt_splitting("1925 BCE");
|
||||
self::assertEquals($output, [
|
||||
0 => "-1925",
|
||||
1 => "-1925",
|
||||
2 => "00",
|
||||
3 => "00",
|
||||
4 => "-",
|
||||
5 => "",
|
||||
]);
|
||||
self::assertEquals(NodaTimeSplitter::timePartsToTimeName($output), "1925 v. Chr.");
|
||||
self::assertEquals(NodaTimeSplitter::timePartsToCountingYear($output), 1925);
|
||||
|
||||
$output = NodaTimeSplitter::attempt_splitting("1925 CE");
|
||||
self::assertEquals($output, [
|
||||
0 => "1925",
|
||||
1 => "1925",
|
||||
2 => "00",
|
||||
3 => "00",
|
||||
4 => "+",
|
||||
5 => "",
|
||||
]);
|
||||
self::assertEquals(NodaTimeSplitter::timePartsToTimeName($output), "1925");
|
||||
self::assertEquals(NodaTimeSplitter::timePartsToCountingYear($output), 1925);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Test to check whether the HTML page is correctly generated.
|
||||
*
|
||||
|
Reference in New Issue
Block a user