You are here

public function CookieTest::testConstructorWithDateTime in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/http-foundation/Tests/CookieTest.php \Symfony\Component\HttpFoundation\Tests\CookieTest::testConstructorWithDateTime()

File

vendor/symfony/http-foundation/Tests/CookieTest.php, line 94

Class

CookieTest
CookieTest.

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testConstructorWithDateTime() {
  $expire = new \DateTime();
  $cookie = new Cookie('foo', 'bar', $expire);
  $this
    ->assertEquals($expire
    ->format('U'), $cookie
    ->getExpiresTime(), '->getExpiresTime() returns the expire date');
}