/** * @dataProvider providerIsExpiredIsPersistent * * @param integer $expires The cookie expiration time. * @param boolean $isExpired The expected value for isExpired. * @param boolean $isPersistent The expected value for isPersistent. */ public function testIsExpiredIsPersistent($expires, $isExpired, $isPersistent) { $cookie = new Cookie('foo', 'bar'); $cookie->setExpires($expires); $this->assertSame($isExpired, $cookie->isExpired()); $this->assertSame($isPersistent, $cookie->isPersistent()); }
/** * Returns whether this cookie has expired. * * @return boolean */ public function isExpired() { return $this->cookie->isExpired(); }