Skip to content

Commit 9e671ae

Browse files
WebMambafabpot
authored andcommitted
Ban DateTime from the codebase
1 parent 35c48a0 commit 9e671ae

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Tests/ResponseTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -796,17 +796,17 @@ public function testIsImmutable()
796796
public function testSetDate()
797797
{
798798
$response = new Response();
799-
$response->setDate(\DateTime::createFromFormat(\DateTime::ATOM, '2013-01-26T09:21:56+0100', new \DateTimeZone('Europe/Berlin')));
799+
$response->setDate(\DateTime::createFromFormat(\DateTimeInterface::ATOM, '2013-01-26T09:21:56+0100', new \DateTimeZone('Europe/Berlin')));
800800

801-
$this->assertEquals('2013-01-26T08:21:56+00:00', $response->getDate()->format(\DateTime::ATOM));
801+
$this->assertEquals('2013-01-26T08:21:56+00:00', $response->getDate()->format(\DateTimeInterface::ATOM));
802802
}
803803

804804
public function testSetDateWithImmutable()
805805
{
806806
$response = new Response();
807-
$response->setDate(\DateTimeImmutable::createFromFormat(\DateTime::ATOM, '2013-01-26T09:21:56+0100', new \DateTimeZone('Europe/Berlin')));
807+
$response->setDate(\DateTimeImmutable::createFromFormat(\DateTimeInterface::ATOM, '2013-01-26T09:21:56+0100', new \DateTimeZone('Europe/Berlin')));
808808

809-
$this->assertEquals('2013-01-26T08:21:56+00:00', $response->getDate()->format(\DateTime::ATOM));
809+
$this->assertEquals('2013-01-26T08:21:56+00:00', $response->getDate()->format(\DateTimeInterface::ATOM));
810810
}
811811

812812
public function testSetExpires()

0 commit comments

Comments
 (0)