/**
  * @dataProvider dataGetData
  * @covers ::getData
  */
 public function testGetData($parameters, $expected, $expectedException)
 {
     $request = new PaymentCompleteRequest($this->getHttpClient(), $this->getHttpRequest());
     $request->initialize($parameters);
     if ($expectedException) {
         $this->setExpectedException('Omnipay\\Common\\Exception\\InvalidRequestException', $expectedException);
     }
     $this->assertEquals($expected, $request->getData());
 }
 /**
  * @coversNothing
  */
 public function testPaypalRequestComplete()
 {
     $this->setMockHttpResponse('AuthorisePaypalCompleteSuccess.http');
     $request = new PaymentCompleteRequest($this->getHttpClient(), $this->getHttpRequest());
     $request->initialize(array('transactionReference' => 'PAY-2LY017912Y929154HKQ74XPY', 'payerId' => 'HVMBSS6TABKJN'));
     $response = $request->send();
     $this->assertInstanceOf('Omnipay\\PaypalRest\\Message\\PaymentResponse', $response);
     $this->assertTrue($response->isSuccessful());
     $this->assertEquals('1SN458127W2399139', $response->getTransactionReference());
 }
 /**
  * @coversNothing
  */
 public function testPaypalRequestComplete()
 {
     $this->setMockHttpResponse('PurchasePaypalCompleteSuccess.http');
     $request = new PaymentCompleteRequest($this->getHttpClient(), $this->getHttpRequest());
     $request->initialize(array('transactionReference' => 'PAY-7N5239784Y302191WKQ72KJI', 'payerId' => 'HVMBSS6TABKJN'));
     $response = $request->send();
     $this->assertInstanceOf('Omnipay\\PaypalRest\\Message\\PaymentResponse', $response);
     $this->assertTrue($response->isSuccessful());
     $this->assertEquals('96G836504V833741T', $response->getTransactionReference());
 }