'190', 'BRQ_STATUSMESSAGE' => 'hi!', 'BRQ_PAYMENT' => '5', 'BRQ_INVOICENUMBER' => 'website-reference', ); $response = new CompletePurchaseResponse($this->getMockRequest(), $data); $this->assertTrue($response->isSuccessful()); $this->assertSame('190', $response->getCode()); $this->assertSame('hi!', $response->getMessage()); $this->assertSame('5', $response->getTransactionReference()); $this->assertSame('website-reference', $response->getTransactionId()); } public function testEmpty() { $response = new CompletePurchaseResponse($this->getMockRequest(), array()); $this->assertFalse($response->isSuccessful()); $this->assertNull($response->getCode()); $this->assertNull($response->getMessage()); $this->assertNull($response->getTransactionReference()); } }