Permalink
Browse files

* fix testIsOlderThan()

# this method name is so confusing that often I don't know myself what I should expect from it...


git-svn-id: http://svn.php.net/repository/pear/packages/HTTP_Header/trunk@165233 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
1 parent be5272c commit aa1a4f587135f7cfea7d28cde71d74a85a02675c @m6w6 m6w6 committed Aug 4, 2004
Showing with 4 additions and 4 deletions.
  1. +4 −4 tests/header_cache.php
View
@@ -41,11 +41,11 @@ function testgetCacheStart()
function testisOlderThan()
{
$c = &new HTTP_Header_Cache;
- $this->assertFalse($c->isOlderThan(1, 'second'));
- $this->assertFalse($c->isOlderThan(1, 'hour'));
- sleep(2);
$this->assertTrue($c->isOlderThan(1, 'second'));
- unset($c);
+ $this->assertTrue($c->isOlderThan(1, 'hour'));
+ $_SERVER['HTTP_IF_MODIFIED_SINCE'] = HTTP::Date(time() - 3);
+ $this->assertTrue($c->isOlderThan(1, 'second'));
+ unset($c, $_SERVER['HTTP_IF_MODIFIED_SINCE']);
}
function testisCached()

0 comments on commit aa1a4f5

Please sign in to comment.