add support for DateTimeImmutable
Adds support for DateTimeImmutable by using the shared DateTimeInterface which both this and DateTime implement.
This commit is contained in:
1 parent
7923bfef7a
commit
3f67dbe66f
2 files changed
+2
-1
No files matched your search
@@ -90,6 +90,7 @@ class CellTypeHelperTest extends TestCase
|
||||
public function testIsDateOrInterval()
|
||||
{
|
||||
$this->assertTrue(CellTypeHelper::isDateTimeOrDateInterval(new \DateTime()));
|
||||
$this->assertTrue(CellTypeHelper::isDateTimeOrDateInterval(new \DateTimeImmutable()));
|
||||
$this->assertTrue(CellTypeHelper::isDateTimeOrDateInterval(new \DateInterval('P1D')));
|
||||
|
||||
$this->assertFalse(CellTypeHelper::isDateTimeOrDateInterval(true));
|
||||
|
||||
Reference in new issue
Block a user