getCommand(); $command->setArguments($arguments); $this->assertSame($expected, $command->getArguments()); } /** * @group disconnected */ public function testParseResponse(): void { $response = ['predis:incoming', 'predis:outgoing']; $expected = ['predis:incoming', 'predis:outgoing']; $command = $this->getCommandWithArguments('channels', 'predis:*'); $this->assertSame($expected, $command->parseResponse($response)); } /** * @group disconnected */ public function testPubsubNumsub(): void { $response = ['predis:incoming', '10', 'predis:outgoing', '8']; $expected = ['predis:incoming' => '10', 'predis:outgoing' => '8']; $command = $this->getCommandWithArguments('numsub', 'predis:incoming', 'predis:outgoing'); $this->assertSame($expected, $command->parseResponse($response)); } /** * @group disconnected */ public function testPubsubNumpat(): void { $response = 6; $expected = 6; $command = $this->getCommandWithArguments('numpat'); $this->assertSame($expected, $command->parseResponse($response)); } }