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

1.1     ! misho       1: --TEST--
        !             2: Bug #34643 (wsdl default value)
        !             3: --SKIPIF--
        !             4: <?php require_once('skipif.inc'); ?>
        !             5: --INI--
        !             6: soap.wsdl_cache_enabled=0
        !             7: --FILE--
        !             8: <?php
        !             9: ini_set("soap.wsdl_cache_enabled", 0);
        !            10: 
        !            11: class fp {
        !            12:        public function get_it($opt="zzz") {
        !            13:                return $opt;
        !            14:        }
        !            15: }
        !            16: 
        !            17: class LocalSoapClient extends SoapClient {
        !            18: 
        !            19:   function __construct($wsdl, $options) {
        !            20:     parent::__construct($wsdl, $options);
        !            21:     $this->server = new SoapServer($wsdl, $options);
        !            22:     $this->server->setClass('fp');
        !            23:   }
        !            24: 
        !            25:   function __doRequest($request, $location, $action, $version, $one_way = 0) {
        !            26:     ob_start();
        !            27:     $this->server->handle($request);
        !            28:     $response = ob_get_contents();
        !            29:     ob_end_clean();
        !            30:     return $response;
        !            31:   }
        !            32: 
        !            33: }
        !            34: 
        !            35: $cl = new LocalSoapClient(dirname(__FILE__).'/bug34643.wsdl', array("trace"=>1));
        !            36: print_r($cl->__getFunctions());
        !            37: echo $cl->get_it("aaa")."\n";
        !            38: echo $cl->get_it()."\n";
        !            39: var_dump($cl->get_it(null));
        !            40: ?>
        !            41: --EXPECT--
        !            42: Array
        !            43: (
        !            44:     [0] => string get_it(string $opt)
        !            45: )
        !            46: aaa
        !            47: zzz
        !            48: NULL

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