From: SVN Migration Date: Tue, 16 Nov 2004 12:07:33 +0000 (+0000) Subject: This commit was manufactured by cvs2svn to create branch 'PHP_5_0'. X-Git-Tag: php-5.0.3RC1~53 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e1c0bcd35f4e8c314aea6d87dd73b8b6b15b8d6a;p=php This commit was manufactured by cvs2svn to create branch 'PHP_5_0'. --- diff --git a/ext/soap/tests/classmap.wsdl b/ext/soap/tests/classmap.wsdl new file mode 100644 index 0000000000..cb081b2e98 --- /dev/null +++ b/ext/soap/tests/classmap.wsdl @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ext/soap/tests/classmap001.phpt b/ext/soap/tests/classmap001.phpt new file mode 100644 index 0000000000..0bda1674b6 --- /dev/null +++ b/ext/soap/tests/classmap001.phpt @@ -0,0 +1,50 @@ +--TEST-- +SOAP Classmap 1: SoapServer support for classmap +--SKIPIF-- + +--FILE-- + + + + + Blaat + aap + + + + +"; + +class test{ + function dotest(book $book){ + $classname=get_class($book); + return "Classname: ".$classname; + } +} + +class book{ + public $a="a"; + public $b="c"; + +} +$options=Array( + 'actor' =>'http://schema.nothing.com', + 'classmap' => array('book'=>'book', 'wsdltype2'=>'classname2') + ); + +$server = new SoapServer(dirname(__FILE__)."/classmap.wsdl",$options); +$server->setClass("test"); +$server->handle(); +echo "ok\n"; +?> +--EXPECT-- + +Classname: book +ok diff --git a/ext/soap/tests/classmap002.phpt b/ext/soap/tests/classmap002.phpt new file mode 100644 index 0000000000..551198e13b --- /dev/null +++ b/ext/soap/tests/classmap002.phpt @@ -0,0 +1,44 @@ +--TEST-- +SOAP Classmap 2: SoapClient support for classmap +--SKIPIF-- + +--FILE-- + + + + Blaat + aap + + +EOF; + } +} + +class book{ + public $a="a"; + public $b="c"; + +} + +$options=Array( + 'actor' =>'http://schema.nothing.com', + 'classmap' => array('book'=>'book', 'wsdltype2'=>'classname2') + ); + +$client = new TestSoapClient(dirname(__FILE__)."/classmap.wsdl",$options); +$ret = $client->dotest2("???"); +var_dump($ret); +echo "ok\n"; +?> +--EXPECT-- +object(book)#2 (2) { + ["a"]=> + string(5) "Blaat" + ["b"]=> + string(3) "aap" +} +ok