public function testCaptureError()
 {
     $this->setMockHttpResponse('CaptureFailure.txt');
     $response = $this->gateway->capture(array('amount' => '400.00', 'transactionReference' => 'ch_lfUYEBK14zotCTykezJkfg'))->send();
     $this->assertFalse($response->isSuccessful());
     $this->assertFalse($response->isRedirect());
     $this->assertSame('Failure', $response->getMessage());
 }
 public function testCaptureSuccess()
 {
     $result = new \stdClass();
     $result->State = 2;
     $result->Status = 1;
     $result->Message = '';
     $result->Technical = '';
     $result->TransactionID = 'f0e5b9f4-ec28-4ff2-aaed-195ec71aefcc';
     $wrapper = new \stdClass();
     $wrapper->CaptureResult = $result;
     $this->mockSoapClient->expects($this->any())->method('Capture')->will($this->returnValue($wrapper));
     $this->options = array('transactionReference' => 'f0e5b9f4-ec28-4ff2-aaed-195ec71aefcc');
     $response = $this->gateway->capture($this->options)->send();
     $this->assertTrue($response->isSuccessful());
     $this->assertFalse($response->isRedirect());
     $this->assertEquals('f0e5b9f4-ec28-4ff2-aaed-195ec71aefcc', $response->getTransactionReference());
     $this->assertEmpty($response->getMessage());
 }