getCommand(); $command->setArguments([]); $this->assertSame([], $command->getArguments()); } /** * @group disconnected */ public function testParseResponse(): void { $this->assertSame('OK', $this->getCommand()->parseResponse('OK')); } /** * @group connected */ public function testInitializesNewTransaction(): void { $redis = $this->getClient(); $this->assertEquals('OK', $redis->multi()); $this->assertEquals('QUEUED', $redis->echo('tx1')); $this->assertEquals('QUEUED', $redis->echo('tx2')); } /** * @group connected */ public function testActuallyReturnsResponseObjectAbstraction(): void { $redis = $this->getClient(); $this->assertInstanceOf('Predis\Response\Status', $redis->multi()); $this->assertInstanceOf('Predis\Response\Status', $redis->echo('tx1')); $this->assertInstanceOf('Predis\Response\Status', $redis->echo('tx2')); } /** * @group connected */ public function testThrowsExceptionWhenCallingMultiInsideTransaction(): void { $this->expectException('Predis\Response\ServerException'); $this->expectExceptionMessage('ERR MULTI calls can not be nested'); $redis = $this->getClient(); $redis->multi(); $redis->multi(); } }