Skip to content

Commit 0f003bc

Browse files
Soenke Ruemplermichael-grunder
authored andcommitted
regression test for: setex properly handles long expire values
1 parent f3c0dd2 commit 0f003bc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/TestRedis.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,13 @@ public function testSetNX() {
408408
$this->assertTrue($this->redis->get('key') === '42');
409409
}
410410

411+
public function testExpireAtWithLong() {
412+
$longExpiryTimeExceedingInt = 3153600000;
413+
$this->redis->delete('key');
414+
$this->assertTrue($this->redis->setex('key', $longExpiryTimeExceedingInt, 'val') === TRUE);
415+
$this->assertTrue($this->redis->ttl('key') === $longExpiryTimeExceedingInt);
416+
}
417+
411418
public function testIncr()
412419
{
413420
$this->redis->set('key', 0);

0 commit comments

Comments
 (0)