Add test assertion for splitting international dates
This commit is contained in:
parent
de7968fbbd
commit
baeb9ba72e
|
@ -241,6 +241,18 @@ final class NodaTimeSplitterTest extends TestCase {
|
|||
self::assertEquals(NodaTimeSplitter::timePartsToTimeName($output), "02.01.2020");
|
||||
self::assertEquals(NodaTimeSplitter::timePartsToCountingYear($output), 2020);
|
||||
|
||||
$output = NodaTimeSplitter::attempt_splitting("2020-01-02");
|
||||
self::assertEquals($output, [
|
||||
0 => "2020",
|
||||
1 => "2020",
|
||||
2 => "01",
|
||||
3 => "02",
|
||||
4 => "+",
|
||||
5 => "",
|
||||
]);
|
||||
self::assertEquals(NodaTimeSplitter::timePartsToTimeName($output), "02.01.2020");
|
||||
self::assertEquals(NodaTimeSplitter::timePartsToCountingYear($output), 2020);
|
||||
|
||||
$output = NodaTimeSplitter::attempt_splitting("1920-tól 1929-ig");
|
||||
self::assertEquals($output, [
|
||||
0 => "1920",
|
||||
|
|
Loading…
Reference in New Issue
Block a user