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

1.1     ! misho       1: --TEST--
        !             2: Bug #28969 (Wrong data encoding of special characters)
        !             3: --SKIPIF--
        !             4: <?php require_once('skipif.inc'); ?>
        !             5: --FILE--
        !             6: <?php
        !             7: function test() {
        !             8:   return "¦è¥";
        !             9: //  return utf8_encode("¦è¥");
        !            10: }
        !            11: 
        !            12: class LocalSoapClient extends SoapClient {
        !            13: 
        !            14:   function __construct($wsdl, $options) {
        !            15:     parent::__construct($wsdl, $options);
        !            16:     $this->server = new SoapServer($wsdl, $options);
        !            17:     $this->server->addFunction('test');
        !            18:   }
        !            19: 
        !            20:   function __doRequest($request, $location, $action, $version, $one_way = 0) {
        !            21:     ob_start();
        !            22:     $this->server->handle($request);
        !            23:     $response = ob_get_contents();
        !            24:     ob_end_clean();
        !            25:     return $response;
        !            26:   }
        !            27: 
        !            28: }
        !            29: 
        !            30: $x = new LocalSoapClient(NULL,array('location'=>'test://', 
        !            31:                                     'uri'=>'http://testuri.org',
        !            32:                                     'encoding'=>'ISO-8859-1')); 
        !            33: var_dump($x->test());
        !            34: echo "ok\n";
        !            35: ?>
        !            36: --EXPECT--
        !            37: string(3) "¦è¥"
        !            38: ok

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