getCommand(); $command->setArguments($actualArguments); $this->assertSameValues($expectedArguments, $command->getArguments()); } /** * @group disconnected */ public function testParseResponse(): void { $actualResponse = ['width', 2000, 'depth', 10, 'count', 0]; $expectedResponse = ['width' => 2000, 'depth' => 10, 'count' => 0]; $this->assertSame($expectedResponse, $this->getCommand()->parseResponse($actualResponse)); } /** * @group connected * @group relay-resp3 * @return void * @requiresRedisBfVersion >= 2.0.0 */ public function testReturnsInfoAboutGivenCountMinSketch(): void { $redis = $this->getClient(); $expectedResponse = ['width' => 2000, 'depth' => 10, 'count' => 0]; $redis->cmsinitbydim('key', 2000, 10); $actualResponse = $redis->cmsinfo('key'); $this->assertSame($expectedResponse, $actualResponse); } /** * @group connected * @requiresRedisBfVersion >= 2.0.0 */ public function testThrowsExceptionOnNonExistingKey(): void { $this->expectException(ServerException::class); $this->expectExceptionMessage('CMS: key does not exist'); $redis = $this->getClient(); $redis->cmsinfo('cmsinfo_foo'); } }