Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5ee3c84

Browse files
committed
INFO COMMANDSTATS is new in 2.6.0
1 parent e839d24 commit 5ee3c84

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/TestRedis.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1626,8 +1626,15 @@ public function testinfo() {
16261626
foreach($keys as $k) {
16271627
$this->assertTrue(in_array($k, array_keys($info)));
16281628
}
1629+
}
1630+
1631+
public function testInfoCommandStats() {
1632+
1633+
// INFO COMMANDSTATS is new in 2.6.0
1634+
if (version_compare($this->version, "2.5.0", "lt")) {
1635+
return;
1636+
}
16291637

1630-
// INFO COMMANDSTATS
16311638
$info = $this->redis->info("COMMANDSTATS");
16321639

16331640
$this->assertTrue(is_array($info));

0 commit comments

Comments
 (0)