public function ResponseTest::testSetExpires in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-foundation/Tests/ResponseTest.php \Symfony\Component\HttpFoundation\Tests\ResponseTest::testSetExpires()
File
- vendor/
symfony/ http-foundation/ Tests/ ResponseTest.php, line 627
Class
Namespace
Symfony\Component\HttpFoundation\TestsCode
public function testSetExpires() {
$response = new Response();
$response
->setExpires(null);
$this
->assertNull($response
->getExpires(), '->setExpires() remove the header when passed null');
$now = new \DateTime();
$response
->setExpires($now);
$this
->assertEquals($response
->getExpires()
->getTimestamp(), $now
->getTimestamp());
}