Annotation of embedaddon/php/ext/soap/tests/bugs/bug55323.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Bug #55323 (SoapClient segmentation fault when XSD_TYPEKIND_EXTENSION contains itself)
        !             3: --SKIPIF--
        !             4: <?php require_once('skipif.inc'); ?>
        !             5: --FILE--
        !             6: <?php
        !             7: ini_set("soap.wsdl_cache_enabled",0);
        !             8: $timestamp = "2011-07-30T03:25:00-05:00";
        !             9: $wsdl = dirname(__FILE__)."/bug55323.wsdl";
        !            10: 
        !            11: class TestSoapClient extends SoapClient {
        !            12: 
        !            13:   function __construct($wsdl, $options) {
        !            14:     parent::__construct($wsdl, $options);
        !            15:   }
        !            16: 
        !            17:   function __doRequest($request, $location, $action, $version, $one_way = 0) {
        !            18:     return <<<EOF
        !            19: <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test.com/soap/v3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
        !            20:    <SOAP-ENV:Body>
        !            21:       <ns1:getObjectResponse>
        !            22:          <getObjectReturn xsi:type="ns1:Customer" id="ref1">
        !            23:             <accountId xsi:type="xsd:int">1234</accountId>
        !            24:             <parent href="#ref1"/>
        !            25:          </getObjectReturn>
        !            26:       </ns1:getObjectResponse>
        !            27:    </SOAP-ENV:Body>
        !            28: </SOAP-ENV:Envelope>
        !            29: EOF;
        !            30:   }
        !            31: 
        !            32: }
        !            33: 
        !            34: $soapClient = new TestSoapClient($wsdl,
        !            35:         array('trace' => 1, 'exceptions' => 0));
        !            36: $result = $soapClient->getObject();
        !            37: var_dump($result);
        !            38: ?>
        !            39: --EXPECTF--
        !            40: object(stdClass)#%d (2) {
        !            41:   ["accountId"]=>
        !            42:   int(1234)
        !            43:   ["parent"]=>
        !            44:   *RECURSION*
        !            45: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>