Exemple #1
0
 public function testAging()
 {
     $cookie = new SimpleCookie('name', 'value', '/path', 200);
     $cookie->agePrematurely(199);
     $this->assertFalse($cookie->isExpired(0));
     $cookie->agePrematurely(2);
     $this->assertTrue($cookie->isExpired(0));
 }
 function testAging()
 {
     $cookie = new SimpleCookie("name", "value", "/path", 200);
     $cookie->agePrematurely(199);
     $this->assertFalse($cookie->isExpired(0));
     $cookie->agePrematurely(2);
     $this->assertTrue($cookie->isExpired(0));
 }
Exemple #3
0
 function testDateExpiry()
 {
     $cookie = new SimpleCookie("name", "value", "/path", "Mon, 18 Nov 2002 15:50:29 GMT");
     $this->assertTrue($cookie->isExpired("Mon, 18 Nov 2002 15:50:30 GMT"));
     $this->assertFalse($cookie->isExpired("Mon, 18 Nov 2002 15:50:28 GMT"));
 }