public function testCreateTransactionReturnAValidResponseFromTheRequest() { // Arrange. $expected = ['foo' => 'bar']; $data = []; $this->setClientWithMockedResponse([new Response(200, [], '{"foo": "bar", "_links": {"rel1": {"href": "fake-uri"}}}'), $this->getAuthTokenResponse()]); // Act. $actual = $this->client->createTransaction($data); // Assert. $this->assertEquals($expected, $actual); }