Skip to content

Commit 90bdf9e

Browse files
committed
Fix test for TTL return value
Resolves issue phpredis#302
1 parent 3e777b4 commit 90bdf9e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/TestRedis.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2368,8 +2368,9 @@ protected function sequence($mode) {
23682368
->expireAt('key', '0000')
23692369
->exec();
23702370
$this->assertTrue(is_array($ret));
2371-
$i = 0;
2372-
$this->assertTrue($ret[$i++] == -1);
2371+
$i = 0;
2372+
$ttl = $ret[$i++];
2373+
$this->assertTrue($ttl === -1 || $ttl === -2);
23732374
$this->assertTrue($ret[$i++] === array('val1', 'valX', FALSE)); // mget
23742375
$this->assertTrue($ret[$i++] === TRUE); // mset
23752376
$this->assertTrue($ret[$i++] === TRUE); // set

0 commit comments

Comments
 (0)