Explorar el Código

ZF-11937
Added support for xsd:long is Zend_Soap_Wsdl


git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@24581 44c647ce-9c0f-0410-b52a-842ac1e357ba

ralph hace 14 años
padre
commit
abaf39f631
Se han modificado 2 ficheros con 11 adiciones y 7 borrados
  1. 2 7
      library/Zend/Soap/Wsdl.php
  2. 9 0
      tests/Zend/Soap/WsdlTest.php

+ 2 - 7
library/Zend/Soap/Wsdl.php

@@ -543,28 +543,23 @@ class Zend_Soap_Wsdl
             case 'string':
             case 'str':
                 return 'xsd:string';
-                break;
+            case 'long':
+                return 'xsd:long';
             case 'int':
             case 'integer':
                 return 'xsd:int';
-                break;
             case 'float':
             case 'double':
                 return 'xsd:float';
-                break;
             case 'boolean':
             case 'bool':
                 return 'xsd:boolean';
-                break;
             case 'array':
                 return 'soap-enc:Array';
-                break;
             case 'object':
                 return 'xsd:struct';
-                break;
             case 'mixed':
                 return 'xsd:anyType';
-                break;
             case 'void':
                 return '';
             default:

+ 9 - 0
tests/Zend/Soap/WsdlTest.php

@@ -637,6 +637,15 @@ class Zend_Soap_WsdlTest extends PHPUnit_Framework_TestCase
     }
 
     /**
+     * @group ZF-11937
+     */
+    public function testWsdlGetTypeWillAllowLongType()
+    {
+        $wsdl = new Zend_Soap_Wsdl('MyService', 'http://localhost/MyService.php');
+        $this->assertEquals("xsd:long", $wsdl->getType("long"));
+    }
+
+    /**
      * @group ZF-5430
      */
     public function testMultipleSequenceDefinitionsOfSameTypeWillBeRecognizedOnceBySequenceStrategy()