/** * @dataProvider dataProvider */ public function testGetData($xml) { $data = $this->request->getData(); $this->assertInstanceOf('SimpleXMLElement', $data); // Just so the provider remains readable... $dom = dom_import_simplexml($data)->ownerDocument; $dom->formatOutput = true; $this->assertEquals($xml, $dom->saveXML()); }
public function testSendSuccess() { $this->setMockHttpResponse('RestFetchPaymentMethodsSuccess.txt'); $response = $this->request->send(); $paymentMethods = $response->getPaymentMethods(); $this->assertTrue($response->isSuccessful()); $this->assertFalse($response->isRedirect()); $this->assertNull($response->getTransactionReference()); $this->assertInternalType('array', $paymentMethods); $this->assertContainsOnlyInstancesOf('Omnipay\\Common\\PaymentMethod', $paymentMethods); }