public function isStale($nowTimestamp = null) { if (!$nowTimestamp) { $nowTimestamp = time(); } return $nowTimestamp > $this->expirationTimestamp; }
public function testUsesNowFunctionByDefaultForStaleCheck() { $result = 'garay2'; $value = new Value($result, time() + 1); $this->assertFalse($value->isStale()); }