Skip to content

Commit

Permalink
Add workaround for sebastianbergmann/phpunit#3217
Browse files Browse the repository at this point in the history
  • Loading branch information
Hecke29 committed Jul 18, 2018
1 parent 7db0024 commit ef49969
Show file tree
Hide file tree
Showing 2 changed files with 303 additions and 450 deletions.
6 changes: 4 additions & 2 deletions tests/AbstractClientTest.php
Expand Up @@ -21,7 +21,7 @@ abstract class AbstractClientTest extends TestCase
*/
protected function getSoapClient($method, $response)
{
$stub = $this->getMockFromWsdl('http://www.domain-bestellsystem.de/soapstatus/wsdl/soap.wsdl');
$stub = $this->getMockFromWsdl(__DIR__.'/Resources/soap.wsdl');

$stub->expects($this->once())->method('__soapCall')
->with(
Expand All @@ -38,9 +38,11 @@ protected function getSoapClient($method, $response)
* @param $apiXmlResponseString
* @return mixed
*/
protected function createStdClassFromApiResponse($apiXmlResponseString) {
protected function createStdClassFromApiResponse($apiXmlResponseString)
{
$xml = preg_replace('/(<\/?)([\w-]+):([^>]*>)/', '$1$2$3', $apiXmlResponseString);
$returnValueInXml = (new \SimpleXMLElement($xml))->xpath('//return')[0];

return json_decode(json_encode($returnValueInXml));
}

Expand Down

0 comments on commit ef49969

Please sign in to comment.