コード例 #1
0
ファイル: cookies_test.php プロジェクト: guicara/simpletest
 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));
 }
コード例 #2
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));
 }
コード例 #3
0
ファイル: http_test.php プロジェクト: adamfranco/harmoni
 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"));
 }