function testExpiryFilterByAgeing() { $cookie = new SimpleCookie("a", "A", "/", "Wed, 25-Dec-02 04:24:20 GMT"); $jar = new CookieJar(); $jar->setCookie($cookie); $jar->restartSession("Wed, 25-Dec-02 04:24:19 GMT"); $this->assertIdentical($list = $jar->getValidCookies(false, "/"), array($cookie)); $jar->agePrematurely(2); $jar->restartSession("Wed, 25-Dec-02 04:24:19 GMT"); $this->assertIdentical($list = $jar->getValidCookies(false, "/"), array()); }