public function CookieTest::testIsExpired in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/browser-kit/Tests/CookieTest.php \Symfony\Component\BrowserKit\Tests\CookieTest::testIsExpired()
File
- vendor/
symfony/ browser-kit/ Tests/ CookieTest.php, line 168
Class
Namespace
Symfony\Component\BrowserKit\TestsCode
public function testIsExpired() {
$cookie = new Cookie('foo', 'bar');
$this
->assertFalse($cookie
->isExpired(), '->isExpired() returns false when the cookie never expires (null as expires time)');
$cookie = new Cookie('foo', 'bar', time() - 86400);
$this
->assertTrue($cookie
->isExpired(), '->isExpired() returns true when the cookie is expired');
$cookie = new Cookie('foo', 'bar', 0);
$this
->assertFalse($cookie
->isExpired());
}