Add tests for German dates, enable splitting of 5 digit timespans

This commit is contained in:
jrenslin authored and Stefan Rohde-Enslin committed 2020-09-26 15:10:06 +02:00
1 parent 14b0d8037d
commit 3058f25a1c
4 files changed
+193 -1

No files matched your search

+22
View File
@@ -255,6 +255,28 @@ final class NodaTimeAutotranslaterTest 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 testCanTranslateSingleThreeDigitYearBeforeCommonEra():void {
$timeInfo = [
"zeit_beginn" => "-100",
"zeit_ende" => "-100",
"zeit_zaehlzeit_jahr" => "100",
"zeit_zaehlzeit_monat" => "00",
"zeit_zaehlzeit_tag" => "00",
];
$output = NodaTimeAutotranslater::getTranslations($timeInfo);
self::assertEquals($output["de"], "100 v. Chr.");
}
/**
* Test to check whether the HTML page is correctly generated.
*