-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #88 from sungcheng/sung-add-more-testablestuff
Add setNextResponseByString to make testing easier
- Loading branch information
Showing
2 changed files
with
137 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
namespace Omnipay\Vindicia; | ||
|
||
use Omnipay\Tests\TestCase; | ||
|
||
class TestableSoapClientTest extends TestCase | ||
{ | ||
public function testSetNextResponseByStringDoesNotFail() | ||
{ | ||
$soap_content = '<?xml version="1.0" encoding="UTF-8"?> | ||
<soap:Envelope | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" | ||
xmlns:vin="http://soap.vindicia.com/v18_0/Vindicia" | ||
xmlns:xsd="http://www.w3.org/2001/XMLSchema" | ||
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" | ||
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> | ||
<soap:Body> | ||
<authResponse xmlns="http://soap.vindicia.com/v18_0/Transaction"> | ||
<return xmlns="" xsi:type="vin:Return"> | ||
<returnCode xsi:type="vin:ReturnCode">400</returnCode> | ||
<soapId xsi:type="xsd:string">1234567890abcdef1234567890abcdef</soapId> | ||
<returnString xsi:type="xsd:string">Data validation error Failed to create Payment-Type-Specific Payment Record: Credit Card conversion failed: Credit Card failed Luhn check. </returnString> | ||
</return> | ||
</authResponse> | ||
</soap:Body> | ||
</soap:Envelope> | ||
'; | ||
|
||
TestableSoapClient::setNextResponseByString($soap_content); | ||
} | ||
} |