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

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

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.
*