diff --git a/tests/NodaTimeSplitterTest.php b/tests/NodaTimeSplitterTest.php index d9fdd51..0d1d0fa 100644 --- a/tests/NodaTimeSplitterTest.php +++ b/tests/NodaTimeSplitterTest.php @@ -1372,14 +1372,16 @@ final class NodaTimeSplitterTest extends TestCase { $output = NodaTimeSplitter::attempt_splitting("20th century"); self::assertNotEmpty($output); - self::assertEquals($output->toOldFormat(), [ - 0 => "1901", - 1 => "2000", - 2 => "00", - 3 => "00", - 4 => "+", - 5 => "", - ]); + if ($output !== false) { + self::assertEquals($output->toOldFormat(), [ + 0 => "1901", + 1 => "2000", + 2 => "00", + 3 => "00", + 4 => "+", + 5 => "", + ]); + } self::assertEquals($output->toTimeName(), "1901-2000"); self::assertEquals(NodaTimeSplitter::timePartsToCountingYear($output), 1951);