From: Dmitry Stogov Date: Fri, 30 Jan 2004 15:08:52 +0000 (+0000) Subject: Some tests from official SOAP 1.2 specification was added X-Git-Tag: php-5.0.0b4RC1~219 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=92aa602af0c2577866d069919a14519d28d0582e;p=php Some tests from official SOAP 1.2 specification was added --- diff --git a/ext/soap/tests/soap12/T24.phpt b/ext/soap/tests/soap12/T24.phpt new file mode 100644 index 0000000000..ac2f84205e --- /dev/null +++ b/ext/soap/tests/soap12/T24.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP 1.2: T24 echoOk +--SKIPIF-- + +--FILE-- + + + + + foo + + + +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- + +SOAP-ENV:VersionMismatchWrong Version diff --git a/ext/soap/tests/soap12/T25.phpt b/ext/soap/tests/soap12/T25.phpt new file mode 100644 index 0000000000..894136eb20 --- /dev/null +++ b/ext/soap/tests/soap12/T25.phpt @@ -0,0 +1,22 @@ +--TEST-- +SOAP 1.2: T25 echoOk +--SKIPIF-- + +--FILE-- + + + + + + foo + + + +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- + +SOAP-ENV:ServerDTD are not supported by SOAP diff --git a/ext/soap/tests/soap12/T27.phpt b/ext/soap/tests/soap12/T27.phpt new file mode 100644 index 0000000000..851b294d4a --- /dev/null +++ b/ext/soap/tests/soap12/T27.phpt @@ -0,0 +1,29 @@ +--TEST-- +SOAP 1.2: T27 echoStringArray +--SKIPIF-- + +--FILE-- + + + + + + + 1 + + + + + +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- + +env:ReceiverSOAP-ERROR: Encoding: Violation of encoding rules + diff --git a/ext/soap/tests/soap12/T28.phpt b/ext/soap/tests/soap12/T28.phpt new file mode 100644 index 0000000000..f93ace7ad2 --- /dev/null +++ b/ext/soap/tests/soap12/T28.phpt @@ -0,0 +1,22 @@ +--TEST-- +SOAP 1.2: T28 echoOk +--SKIPIF-- + +--FILE-- + + + + + foo + + + +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- + +env:ReceiverencodingStyle cannot be specified on the Body + diff --git a/ext/soap/tests/soap12/T31.phpt b/ext/soap/tests/soap12/T31.phpt new file mode 100644 index 0000000000..56dc883a61 --- /dev/null +++ b/ext/soap/tests/soap12/T31.phpt @@ -0,0 +1,22 @@ +--TEST-- +SOAP 1.2: T31 returnVoid +--SKIPIF-- + +--FILE-- + + + + + + + +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- + + +ok + diff --git a/ext/soap/tests/soap12/T33.phpt b/ext/soap/tests/soap12/T33.phpt new file mode 100644 index 0000000000..c39f9e1ace --- /dev/null +++ b/ext/soap/tests/soap12/T33.phpt @@ -0,0 +1,20 @@ +--TEST-- +SOAP 1.2: T33 +--SKIPIF-- + +--FILE-- + + + + + + + +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- + +rpc:ProcedureNotPresentProcedure not present diff --git a/ext/soap/tests/soap12/T41.phpt b/ext/soap/tests/soap12/T41.phpt new file mode 100644 index 0000000000..d57eead1e8 --- /dev/null +++ b/ext/soap/tests/soap12/T41.phpt @@ -0,0 +1,30 @@ +--TEST-- +SOAP 1.2: T41 echoStruct +--SKIPIF-- + +--FILE-- + + + + + + 42 + 0.005 + hello world + + + + +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- + +returnhello world420.005 +ok diff --git a/ext/soap/tests/soap12/T42.phpt b/ext/soap/tests/soap12/T42.phpt new file mode 100644 index 0000000000..7ce828135d --- /dev/null +++ b/ext/soap/tests/soap12/T42.phpt @@ -0,0 +1,39 @@ +--TEST-- +SOAP 1.2: T42 echoStructArray +--SKIPIF-- + +--FILE-- + + + + + + + 42 + 0.005 + hello world + + + 43 + 0.123 + bye world + + + + + +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- + +returnhello world420.005bye world430.123 +ok diff --git a/ext/soap/tests/soap12/T43.phpt b/ext/soap/tests/soap12/T43.phpt new file mode 100644 index 0000000000..7dd6316144 --- /dev/null +++ b/ext/soap/tests/soap12/T43.phpt @@ -0,0 +1,30 @@ +--TEST-- +SOAP 1.2: T43 echoStructAsSimpleTypes +--SKIPIF-- + +--FILE-- + + + + + + 42 + 0.005 + hello world + + + + +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- + +hello world420.005 +ok diff --git a/ext/soap/tests/soap12/T44.phpt b/ext/soap/tests/soap12/T44.phpt new file mode 100644 index 0000000000..2264f105c8 --- /dev/null +++ b/ext/soap/tests/soap12/T44.phpt @@ -0,0 +1,27 @@ +--TEST-- +SOAP 1.2: T44 echoSimpleTypesAsStruct +--SKIPIF-- + +--FILE-- + + + + + 42 + 0.005 + hello world + + + +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- + +returnhello world420.005 +ok diff --git a/ext/soap/tests/soap12/T45.phpt b/ext/soap/tests/soap12/T45.phpt new file mode 100644 index 0000000000..68e3cceeef --- /dev/null +++ b/ext/soap/tests/soap12/T45.phpt @@ -0,0 +1,35 @@ +--TEST-- +SOAP 1.2: T45 echoNestedStruct +--SKIPIF-- + +--FILE-- + + + + + + 42 + 0.005 + hello world + + 99 + 4.0699e-12 + nested struct + + + + + +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- + +returnhello world420.005nested struct994.0699E-12 +ok diff --git a/ext/soap/tests/soap12/T46.phpt b/ext/soap/tests/soap12/T46.phpt new file mode 100644 index 0000000000..9cbb4b16da --- /dev/null +++ b/ext/soap/tests/soap12/T46.phpt @@ -0,0 +1,36 @@ +--TEST-- +SOAP 1.2: T46 echoNestedArray +--SKIPIF-- + +--FILE-- + + + + + + 42 + 0.005 + hello world + + red + blue + green + + + + + +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- + +returnhello world420.005redbluegreen +ok diff --git a/ext/soap/tests/soap12/T47.phpt b/ext/soap/tests/soap12/T47.phpt new file mode 100644 index 0000000000..e1d8b8f1a4 --- /dev/null +++ b/ext/soap/tests/soap12/T47.phpt @@ -0,0 +1,29 @@ +--TEST-- +SOAP 1.2: T47 echoFloatArray +--SKIPIF-- + +--FILE-- + + + + + + 0.00000555 + 12999.9 + + + + +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- + +return5.55E-0612999.9 +ok diff --git a/ext/soap/tests/soap12/T48.phpt b/ext/soap/tests/soap12/T48.phpt new file mode 100644 index 0000000000..07ac4070ae --- /dev/null +++ b/ext/soap/tests/soap12/T48.phpt @@ -0,0 +1,29 @@ +--TEST-- +SOAP 1.2: T48 echoStringArray +--SKIPIF-- + +--FILE-- + + + + + + hello + world + + + + +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- + +returnhelloworld +ok diff --git a/ext/soap/tests/soap12/T49.phpt b/ext/soap/tests/soap12/T49.phpt new file mode 100644 index 0000000000..c919e2b76a --- /dev/null +++ b/ext/soap/tests/soap12/T49.phpt @@ -0,0 +1,29 @@ +--TEST-- +SOAP 1.2: T49 echoStringArray +--SKIPIF-- + +--FILE-- + + + + + + hello + world + + + + +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- + +returnhelloworld +ok diff --git a/ext/soap/tests/soap12/T50.phpt b/ext/soap/tests/soap12/T50.phpt new file mode 100644 index 0000000000..8e431e5aec --- /dev/null +++ b/ext/soap/tests/soap12/T50.phpt @@ -0,0 +1,29 @@ +--TEST-- +SOAP 1.2: T50 echoIntegerArray +--SKIPIF-- + +--FILE-- + + + + + + 100 + 200 + + + + +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- + +return100200 +ok diff --git a/ext/soap/tests/soap12/T51.phpt b/ext/soap/tests/soap12/T51.phpt new file mode 100644 index 0000000000..97765763c1 --- /dev/null +++ b/ext/soap/tests/soap12/T51.phpt @@ -0,0 +1,27 @@ +--TEST-- +SOAP 1.2: T51 echoBase64 +--SKIPIF-- + +--FILE-- + + + + + + YUdWc2JHOGdkMjl5YkdRPQ== + + + + +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- + +returnYUdWc2JHOGdkMjl5YkdRPQ== +ok diff --git a/ext/soap/tests/soap12/T52.phpt b/ext/soap/tests/soap12/T52.phpt new file mode 100644 index 0000000000..3034f0a297 --- /dev/null +++ b/ext/soap/tests/soap12/T52.phpt @@ -0,0 +1,25 @@ +--TEST-- +SOAP 1.2: T52 echoBoolean +--SKIPIF-- + +--FILE-- + + + + + 1 + + + +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- + +return1 +ok diff --git a/ext/soap/tests/soap12/T53.phpt b/ext/soap/tests/soap12/T53.phpt new file mode 100644 index 0000000000..c1c8fe63aa --- /dev/null +++ b/ext/soap/tests/soap12/T53.phpt @@ -0,0 +1,25 @@ +--TEST-- +SOAP 1.2: T53 echoDate +--SKIPIF-- + +--FILE-- + + + + + 1956-10-18T22:20:00-07:00 + + + +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- + +return1956-10-18T22:20:00-07:00 +ok diff --git a/ext/soap/tests/soap12/T54.phpt b/ext/soap/tests/soap12/T54.phpt new file mode 100644 index 0000000000..ba3ed35526 --- /dev/null +++ b/ext/soap/tests/soap12/T54.phpt @@ -0,0 +1,25 @@ +--TEST-- +SOAP 1.2: T54 echoDecimal +--SKIPIF-- + +--FILE-- + + + + + 123.45678901234567890 + + + +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- + +return123.45678901234567890 +ok diff --git a/ext/soap/tests/soap12/T55.phpt b/ext/soap/tests/soap12/T55.phpt new file mode 100644 index 0000000000..1c12e504f2 --- /dev/null +++ b/ext/soap/tests/soap12/T55.phpt @@ -0,0 +1,25 @@ +--TEST-- +SOAP 1.2: T55 echoFloat +--SKIPIF-- + +--FILE-- + + + + + 0.005 + + + +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- + +return0.005 +ok diff --git a/ext/soap/tests/soap12/T56.phpt b/ext/soap/tests/soap12/T56.phpt new file mode 100644 index 0000000000..a653a9dad0 --- /dev/null +++ b/ext/soap/tests/soap12/T56.phpt @@ -0,0 +1,34 @@ +--TEST-- +SOAP 1.2: T56 echoString +--SKIPIF-- + +--FILE-- + + + + + + hello world + + + + + + + + + +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- + +env:ReceiverSOAP-ERROR: Encoding: Unresolved reference '#data-2' + diff --git a/ext/soap/tests/soap12/T57.phpt b/ext/soap/tests/soap12/T57.phpt new file mode 100644 index 0000000000..ad3e9ef50f --- /dev/null +++ b/ext/soap/tests/soap12/T57.phpt @@ -0,0 +1,32 @@ +--TEST-- +SOAP 1.2: T57 echoString +--SKIPIF-- + +--FILE-- + + + + + hello world + + + + + + + + +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- + +returnhello world +ok diff --git a/ext/soap/tests/soap12/T58.phpt b/ext/soap/tests/soap12/T58.phpt new file mode 100644 index 0000000000..e1503ed69c --- /dev/null +++ b/ext/soap/tests/soap12/T58.phpt @@ -0,0 +1,28 @@ +--TEST-- +SOAP 1.2: T58 echoIntegerArray +--SKIPIF-- + +--FILE-- + + + + + + 1 + + + + +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- + +env:ReceiverSOAP-ERROR: Encoding: Violation of encoding rules + diff --git a/ext/soap/tests/soap12/T59.phpt b/ext/soap/tests/soap12/T59.phpt new file mode 100644 index 0000000000..8487a5a6a6 --- /dev/null +++ b/ext/soap/tests/soap12/T59.phpt @@ -0,0 +1,28 @@ +--TEST-- +SOAP 1.2: T59 echoStringArray +--SKIPIF-- + +--FILE-- + + + + + + hello + world + + + + +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- + +env:ReceiverSOAP-ERROR: Encoding: Violation of id and ref information items '#data' diff --git a/ext/soap/tests/soap12/T60.phpt b/ext/soap/tests/soap12/T60.phpt new file mode 100644 index 0000000000..234ef4ccd4 --- /dev/null +++ b/ext/soap/tests/soap12/T60.phpt @@ -0,0 +1,29 @@ +--TEST-- +SOAP 1.2: T60 countItems +--SKIPIF-- + +--FILE-- + + + + + + hello + world + + + + +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- + +return2 +ok diff --git a/ext/soap/tests/soap12/T61.phpt b/ext/soap/tests/soap12/T61.phpt new file mode 100644 index 0000000000..728efb16c7 --- /dev/null +++ b/ext/soap/tests/soap12/T61.phpt @@ -0,0 +1,28 @@ +--TEST-- +SOAP 1.2: T61 countItems +--SKIPIF-- + +--FILE-- + + + + + + hello + world + + + + +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- + +env:ReceiverSOAP-ERROR: Encoding: '*' may only be first arraySize value in list diff --git a/ext/soap/tests/soap12/T69.phpt b/ext/soap/tests/soap12/T69.phpt new file mode 100644 index 0000000000..cf4eac581f --- /dev/null +++ b/ext/soap/tests/soap12/T69.phpt @@ -0,0 +1,19 @@ +--TEST-- +SOAP 1.2: T69 echoOk +--SKIPIF-- + +--FILE-- + + + + foo + + +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- + +env:ReceiverBody must be present in a SOAP envelope diff --git a/ext/soap/tests/soap12/T70.phpt b/ext/soap/tests/soap12/T70.phpt new file mode 100644 index 0000000000..884b686267 --- /dev/null +++ b/ext/soap/tests/soap12/T70.phpt @@ -0,0 +1,23 @@ +--TEST-- +SOAP 1.2: T70 echoOk +--SKIPIF-- + +--FILE-- + + + + foo + + + + + + +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- + +env:ReceiverA SOAP 1.2 envelope can contain only Header and Body diff --git a/ext/soap/tests/soap12/T71.phpt b/ext/soap/tests/soap12/T71.phpt new file mode 100644 index 0000000000..da7bd956ad --- /dev/null +++ b/ext/soap/tests/soap12/T71.phpt @@ -0,0 +1,24 @@ +--TEST-- +SOAP 1.2: T71 echoOk +--SKIPIF-- + +--FILE-- + + + + + foo + + + + + +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- + +env:ReceiverA SOAP Envelope element cannot have non Namespace qualified attributes \ No newline at end of file diff --git a/ext/soap/tests/soap12/T72.phpt b/ext/soap/tests/soap12/T72.phpt new file mode 100644 index 0000000000..6f88f6b936 --- /dev/null +++ b/ext/soap/tests/soap12/T72.phpt @@ -0,0 +1,22 @@ +--TEST-- +SOAP 1.2: T72 echoOk +--SKIPIF-- + +--FILE-- + + + + + foo + + + +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- + +env:ReceiverencodingStyle cannot be specified on the Envelope diff --git a/ext/soap/tests/soap12/T73.phpt b/ext/soap/tests/soap12/T73.phpt new file mode 100644 index 0000000000..5ac1be020b --- /dev/null +++ b/ext/soap/tests/soap12/T73.phpt @@ -0,0 +1,26 @@ +--TEST-- +SOAP 1.2: T73 echoString +--SKIPIF-- + +--FILE-- + + + + + hello world + + + +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- + +returnhello world +ok diff --git a/ext/soap/tests/soap12/T76_1.phpt b/ext/soap/tests/soap12/T76_1.phpt new file mode 100644 index 0000000000..e97c179768 --- /dev/null +++ b/ext/soap/tests/soap12/T76_1.phpt @@ -0,0 +1,25 @@ +--TEST-- +SOAP 1.2: T76.1 echoString +--SKIPIF-- + +--FILE-- + + + + + hello world + + + +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- + +returnhello world +ok diff --git a/ext/soap/tests/soap12/T76_2.phpt b/ext/soap/tests/soap12/T76_2.phpt new file mode 100644 index 0000000000..cc6ea0df95 --- /dev/null +++ b/ext/soap/tests/soap12/T76_2.phpt @@ -0,0 +1,32 @@ +--TEST-- +SOAP 1.2: T76.2 echoString +--SKIPIF-- + +--FILE-- + + + + + hello world + + + + + + + + +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- + +returnhello world +ok diff --git a/ext/soap/tests/soap12/T77_1.phpt b/ext/soap/tests/soap12/T77_1.phpt new file mode 100644 index 0000000000..fea616a9be --- /dev/null +++ b/ext/soap/tests/soap12/T77_1.phpt @@ -0,0 +1,25 @@ +--TEST-- +SOAP 1.2: T77.1 isNil +--SKIPIF-- + +--FILE-- + + + + + + + + +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- + +return1 +ok diff --git a/ext/soap/tests/soap12/T77_2.phpt b/ext/soap/tests/soap12/T77_2.phpt new file mode 100644 index 0000000000..1e49e8a35e --- /dev/null +++ b/ext/soap/tests/soap12/T77_2.phpt @@ -0,0 +1,24 @@ +--TEST-- +SOAP 1.2: T77.2 isNil +--SKIPIF-- + +--FILE-- + + + + + + + +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- + +return1 +ok diff --git a/ext/soap/tests/soap12/T77_3.phpt b/ext/soap/tests/soap12/T77_3.phpt new file mode 100644 index 0000000000..f404dd0bef --- /dev/null +++ b/ext/soap/tests/soap12/T77_3.phpt @@ -0,0 +1,27 @@ +--TEST-- +SOAP 1.2: T77.3 isNul +--SKIPIF-- + +--FILE-- + + + + + + This is a string + + + + +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- + +return0 +ok diff --git a/ext/soap/tests/soap12/skipif.inc b/ext/soap/tests/soap12/skipif.inc new file mode 100644 index 0000000000..fa8574e6a2 --- /dev/null +++ b/ext/soap/tests/soap12/skipif.inc @@ -0,0 +1,3 @@ + diff --git a/ext/soap/tests/soap12/soap12-test.inc b/ext/soap/tests/soap12/soap12-test.inc new file mode 100644 index 0000000000..44733d2ffd --- /dev/null +++ b/ext/soap/tests/soap12/soap12-test.inc @@ -0,0 +1,106 @@ + $struct->varString, + 'outputInteger' => $struct->varInt, + 'outputFloat' => $struct->varFloat); + } + + function echoSimpleTypesAsStruct($string, $int, $float) { + return (object)array("varString" => $string, + "varInt" => $int, + "varFloat" => $float); + } + + function echoNestedStruct($struct) { + return $struct; + } + + function echo2DStringArray($ary) { + return $ary; + } + + function echoNestedArray($ary) { + return $ary; + } + + function countItems($input) { + return count($input); + } + + function isNil($input) { + return is_null($input); + } + + function returnVoid() { + } +} + +$server = new soapserver("http://http://example.org/ts-tests"); +$server->bind(dirname(__FILE__)."/soap12-test.wsdl"); +$server->setClass("Soap12test"); + +$server->handle(); +echo "ok\n"; +?> diff --git a/ext/soap/tests/soap12/soap12-test.wsdl b/ext/soap/tests/soap12/soap12-test.wsdl new file mode 100644 index 0000000000..e1feccfca8 --- /dev/null +++ b/ext/soap/tests/soap12/soap12-test.wsdl @@ -0,0 +1,699 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +