Skip to content

Commit f5db01b

Browse files
remicolletmichael-grunder
authored andcommitted
fix testXGrous expectation for change in redis 8.2.2
1 parent 4517d5f commit f5db01b

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tests/RedisTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3337,7 +3337,7 @@ public function testHashes() {
33373337
$this->assertEquals([123 => FALSE], $this->redis->hMget('h', [123]));
33383338

33393339
// Test with an array populated with things we can't use as keys
3340-
$this->assertFalse($this->redis->hmget('h', [false,NULL,false]));
3340+
$this->assertFalse(@$this->redis->hmget('h', [false,NULL,false]));
33413341

33423342
// Test with some invalid keys mixed in (which should just be ignored)
33433343
$this->assertEquals(
@@ -7161,7 +7161,9 @@ public function testXGroup() {
71617161
$this->assertEquals(1, $this->redis->del('s'));
71627162
$this->assertTrue($this->redis->xGroup('create', 's', 'mygroup', '$', true, 1337));
71637163
$info = $this->redis->xinfo('groups', 's');
7164-
$this->assertTrue(isset($info[0]['entries-read']) && 1337 == (int)$info[0]['entries-read']);
7164+
$this->assertTrue(isset($info[0]['entries-read']));
7165+
/* Starting with redis 8.2.2 returns 0 */
7166+
$this->assertTrue((int)$info[0]['entries-read'] === 1337 || (int)$info[0]['entries-read'] === 0);
71657167
}
71667168

71677169
public function testXAck() {

0 commit comments

Comments
 (0)