From f5db01b7815d6a8c7ef75c7453c68d95382e7997 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 3 Oct 2025 12:05:56 +0200 Subject: [PATCH] fix testXGrous expectation for change in redis 8.2.2 --- tests/RedisTest.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/RedisTest.php b/tests/RedisTest.php index 85dbcf9..a108627 100644 --- a/tests/RedisTest.php +++ b/tests/RedisTest.php @@ -3337,7 +3337,7 @@ class Redis_Test extends TestSuite { $this->assertEquals([123 => FALSE], $this->redis->hMget('h', [123])); // Test with an array populated with things we can't use as keys - $this->assertFalse($this->redis->hmget('h', [false,NULL,false])); + $this->assertFalse(@$this->redis->hmget('h', [false,NULL,false])); // Test with some invalid keys mixed in (which should just be ignored) $this->assertEquals( @@ -7161,7 +7161,9 @@ class Redis_Test extends TestSuite { $this->assertEquals(1, $this->redis->del('s')); $this->assertTrue($this->redis->xGroup('create', 's', 'mygroup', '$', true, 1337)); $info = $this->redis->xinfo('groups', 's'); - $this->assertTrue(isset($info[0]['entries-read']) && 1337 == (int)$info[0]['entries-read']); + $this->assertTrue(isset($info[0]['entries-read'])); + /* Starting with redis 8.2.2 returns 0 */ + $this->assertTrue((int)$info[0]['entries-read'] === 1337 || (int)$info[0]['entries-read'] === 0); } public function testXAck() {