@ -7,6 +7,7 @@
|
||||
declare(strict_types = 1);
|
||||
use PHPUnit\Framework\TestCase;
|
||||
require_once __DIR__ . "/../src/NodaTimeSplitter.php";
|
||||
require_once __DIR__ . "/../src/NodaTimeAutotranslater.php";
|
||||
require_once __DIR__ . "/../../MD_STD/src/MD_STD.php";
|
||||
|
||||
/**
|
||||
@ -277,6 +278,54 @@ final class NodaTimeSplitterTest extends TestCase {
|
||||
self::assertEquals(NodaTimeSplitter::timePartsToTimeName($output), "2000-1901 v. Chr.");
|
||||
self::assertEquals(NodaTimeSplitter::timePartsToCountingYear($output), 1950);
|
||||
|
||||
$output = NodaTimeSplitter::attempt_splitting("20. Jh.");
|
||||
self::assertEquals($output, [
|
||||
0 => "1901",
|
||||
1 => "2000",
|
||||
2 => "00",
|
||||
3 => "00",
|
||||
4 => "+",
|
||||
5 => "",
|
||||
]);
|
||||
self::assertEquals(NodaTimeSplitter::timePartsToTimeName($output), "1901-2000");
|
||||
self::assertEquals(NodaTimeSplitter::timePartsToCountingYear($output), 1951);
|
||||
|
||||
$output = NodaTimeSplitter::attempt_splitting("20. Jhd.");
|
||||
self::assertEquals($output, [
|
||||
0 => "1901",
|
||||
1 => "2000",
|
||||
2 => "00",
|
||||
3 => "00",
|
||||
4 => "+",
|
||||
5 => "",
|
||||
]);
|
||||
self::assertEquals(NodaTimeSplitter::timePartsToTimeName($output), "1901-2000");
|
||||
self::assertEquals(NodaTimeSplitter::timePartsToCountingYear($output), 1951);
|
||||
|
||||
$output = NodaTimeSplitter::attempt_splitting("20. Jhdt.");
|
||||
self::assertEquals($output, [
|
||||
0 => "1901",
|
||||
1 => "2000",
|
||||
2 => "00",
|
||||
3 => "00",
|
||||
4 => "+",
|
||||
5 => "",
|
||||
]);
|
||||
self::assertEquals(NodaTimeSplitter::timePartsToTimeName($output), "1901-2000");
|
||||
self::assertEquals(NodaTimeSplitter::timePartsToCountingYear($output), 1951);
|
||||
|
||||
$output = NodaTimeSplitter::attempt_splitting("20. Jahrhundert");
|
||||
self::assertEquals($output, [
|
||||
0 => "1901",
|
||||
1 => "2000",
|
||||
2 => "00",
|
||||
3 => "00",
|
||||
4 => "+",
|
||||
5 => "",
|
||||
]);
|
||||
self::assertEquals(NodaTimeSplitter::timePartsToTimeName($output), "1901-2000");
|
||||
self::assertEquals(NodaTimeSplitter::timePartsToCountingYear($output), 1951);
|
||||
|
||||
$output = NodaTimeSplitter::attempt_splitting("20.-19. Jahrhundert v. Chr.");
|
||||
self::assertEquals($output, [
|
||||
0 => "-2000",
|
||||
|
Reference in New Issue
Block a user