public function testCardFailure() { $httpResponse = $this->getMockHttpResponse('CardFailure.txt'); $response = new Response($this->getMockRequest(), $httpResponse->json()); $this->assertFalse($response->isSuccessful()); $this->assertFalse($response->isRedirect()); $this->assertNull($response->getCardReference()); $this->assertSame('One or more parameters were missing or invalid', $response->getMessage()); }