public function testHasData() { $client = $this->getMockForAbstractClass('GuzzleHttp\\Command\\ServiceClientInterface'); $command = new Command('foo', []); $trans = new CommandTransaction($client, $command, ['foo' => 'bar']); $this->assertSame($client, $trans->getClient()); $this->assertSame($command, $trans->getCommand()); $this->assertSame('bar', $trans->getContext()->get('foo')); $this->assertNull($trans->getResult()); $this->assertNull($trans->getResponse()); $this->assertNull($trans->getRequest()); $this->assertNull($trans->getException()); }
/** * Get the client associated with the command transfer. * * @return ServiceClientInterface */ public function getClient() { return $this->trans->getClient(); }