Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpredis/phpredis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2022-05-26 18:12:01 +0300
committerPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2022-10-24 09:17:22 +0300
commitd73f3f4b08c09aec5700b2e076ea84433f66d575 (patch)
tree3eb38d5b7d407993ff17f4f94fb3b6936ef328ba /tests
parent8c7c5a3aa2c6b693839a391bffa18ee161cbe73a (diff)
Issue #2106
Diffstat (limited to 'tests')
-rw-r--r--tests/RedisClusterTest.php1
-rw-r--r--tests/RedisTest.php7
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/RedisClusterTest.php b/tests/RedisClusterTest.php
index 6df481d5..88e84691 100644
--- a/tests/RedisClusterTest.php
+++ b/tests/RedisClusterTest.php
@@ -50,6 +50,7 @@ class Redis_Cluster_Test extends Redis_Test {
public function testReset() { return $this->markTestSkipped(); }
public function testInvalidAuthArgs() { return $this->markTestSkipped(); }
public function testScanErrors() { return $this->markTestSkipped(); }
+ public function testTransferredBytes() { return $this->markTestSkipped(); }
public function testlMove() { return $this->markTestSkipped(); }
public function testlPos() { return $this->marktestSkipped(); }
diff --git a/tests/RedisTest.php b/tests/RedisTest.php
index 2a5085ca..53226a9c 100644
--- a/tests/RedisTest.php
+++ b/tests/RedisTest.php
@@ -5752,6 +5752,13 @@ class Redis_Test extends TestSuite
$this->assertTrue($this->redis->getAuth() === $this->getAuth());
}
+ public function testTransferredBytes() {
+ $this->assertTrue($this->redis->ping());
+ $this->assertEquals(strlen("*1\r\n$4\r\nPING\r\n"), $this->redis->getTransferredBytes());
+ $this->assertEquals(['cluster_enabled' => 0], $this->redis->info('cluster'));
+ $this->assertEquals(strlen("*2\r\n$4\r\nINFO\r\n$7\r\ncluster\r\n"), $this->redis->getTransferredBytes());
+ }
+
/**
* Scan and variants
*/