Return to bug41097.phpt CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / soap / tests / bugs |
1.1 misho 1: --TEST-- 2: Bug #41097 (ext/soap returning associative array as indexed without using WSDL) 3: --SKIPIF-- 4: <?php require_once('skipif.inc'); ?> 5: --FILE-- 6: <?php 7: function test($soap, $array) { 8: $soap->test($array); 9: echo (strpos($soap->__getLastRequest(), ':Map"') != false)?"Map\n":"Array\n"; 10: } 11: 12: 13: $soap = new SoapClient(null, array('uri' => 'http://uri/', 'location' => 'test://', 'exceptions' => 0, 'trace' => 1)); 14: test($soap, array('Foo', 'Bar')); 15: test($soap, array(5 => 'Foo', 10 => 'Bar')); 16: test($soap, array('5' => 'Foo', '10' => 'Bar')); 17: $soap->test(new SoapVar(array('Foo', 'Bar'), APACHE_MAP)); 18: echo (strpos($soap->__getLastRequest(), ':Map"') != false)?"Map\n":"Array\n"; 19: $soap->test(new SoapVar(array('Foo', 'Bar'), SOAP_ENC_ARRAY)); 20: echo (strpos($soap->__getLastRequest(), ':Map"') != false)?"Map\n":"Array\n"; 21: ?> 22: --EXPECT-- 23: Array 24: Map 25: Map 26: Map 27: Array