You are here

public function CookieTest::testGetExpiresTime in Zircon Profile 8.0

Same name in this branch
  1. 8.0 vendor/symfony/http-foundation/Tests/CookieTest.php \Symfony\Component\HttpFoundation\Tests\CookieTest::testGetExpiresTime()
  2. 8.0 vendor/symfony/browser-kit/Tests/CookieTest.php \Symfony\Component\BrowserKit\Tests\CookieTest::testGetExpiresTime()
Same name and namespace in other branches
  1. 8 vendor/symfony/browser-kit/Tests/CookieTest.php \Symfony\Component\BrowserKit\Tests\CookieTest::testGetExpiresTime()

File

vendor/symfony/browser-kit/Tests/CookieTest.php, line 159

Class

CookieTest

Namespace

Symfony\Component\BrowserKit\Tests

Code

public function testGetExpiresTime() {
  $cookie = new Cookie('foo', 'bar');
  $this
    ->assertNull($cookie
    ->getExpiresTime(), '->getExpiresTime() returns the expires time');
  $cookie = new Cookie('foo', 'bar', $time = time() - 86400);
  $this
    ->assertEquals($time, $cookie
    ->getExpiresTime(), '->getExpiresTime() returns the expires time');
}