/hphp/test/zend/bad/ext/soap/tests/bugs/bug50698_3.php

http://github.com/facebook/hiphop-php · PHP · 13 lines · 13 code · 0 blank · 0 comment · 5 complexity · 9767d1ba64ac1b9174466f37fad33836 MD5 · raw file

  1. <?php
  2. try {
  3. new SoapClient(dirname(__FILE__) . '/bug50698_3.wsdl');
  4. echo "Call: \"new SoapClient(dirname(__FILE__).'/bug50698_3.wsdl');\" should throw an exception of type 'SoapFault'";
  5. } catch (SoapFault $e) {
  6. if ($e->faultcode == 'WSDL' && $e->faultstring == 'SOAP-ERROR: Parsing WSDL: Could not find any usable binding services in WSDL.') {
  7. echo "ok\n";
  8. } else {
  9. echo "Call: \"new SoapClient(dirname(__FILE__).'/bug50698_3.wsdl');\" threw a SoapFault with an incorrect faultcode or faultmessage.";
  10. print_r($e);
  11. }
  12. }
  13. ?>