/** * {@inheritdoc} */ protected function writeCommand($method, $arguments) { $arguments = Command::normalizeArguments($arguments); $command = $this->client->createCommand($method, $arguments); $this->client->getConnection()->writeCommand($command); }
/** * @group disconnected */ public function testNormalizeVariadic() { $arguments = array('key', 'value1', 'value2', 'value3'); $this->assertSame($arguments, AbstractCommand::normalizeVariadic($arguments)); $this->assertSame($arguments, AbstractCommand::normalizeVariadic(array('key', array('value1', 'value2', 'value3')))); $arguments = array(new \stdClass()); $this->assertSame($arguments, AbstractCommand::normalizeVariadic($arguments)); }