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()); }