/** * @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 testIssuerNotFound() { $this->setMockHttpResponse('RestFetchIssuersFailure.txt'); $response = $this->request->send(); $this->assertEquals('Not found', $response->getMessage()); $this->assertEquals(404, $response->getCode()); $this->assertFalse($response->isRedirect()); $this->assertFalse($response->isSuccessful()); $this->assertInstanceOf('Omnipay\\MultiSafepay\\Message\\RestFetchIssuersResponse', $response); }