Selaa lähdekoodia

[ZF-9816] Zend_Soap_Server : mistake on spelling of the option features (test and trigger_error)

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@22223 44c647ce-9c0f-0410-b52a-842ac1e357ba
jan 15 vuotta sitten
vanhempi
commit
b2f87a5fd1
2 muutettua tiedostoa jossa 16 lisäystä ja 0 poistoa
  1. 1 0
      library/Zend/Soap/Server.php
  2. 15 0
      tests/Zend/Soap/ServerTest.php

+ 1 - 0
library/Zend/Soap/Server.php

@@ -210,6 +210,7 @@ class Zend_Soap_Server implements Zend_Server_Interface
                     $this->setWsdl($value);
                     break;
                 case 'featues':
+                    trigger_error(__METHOD__ . ': the option "featues" is deprecated as of 1.10.x and will be removed with 2.0.0; use "features" instead', E_USER_NOTICE);
                 case 'features':
                     $this->setSoapFeatures($value);
                     break;

+ 15 - 0
tests/Zend/Soap/ServerTest.php

@@ -88,6 +88,21 @@ class Zend_Soap_ServerTest extends PHPUnit_Framework_TestCase
         $this->assertTrue($server->getOptions() == $options);
     }
 
+    /**
+     * @group ZF-9816
+     */
+    public function testSetOptionsWithFeaturesOption()
+    {
+        $server = new Zend_Soap_Server(null, array(
+            'features' => SOAP_SINGLE_ELEMENT_ARRAYS
+        ));
+        
+        $this->assertEquals(
+            SOAP_SINGLE_ELEMENT_ARRAYS,
+            $server->getSoapFeatures()
+        );
+    }
+
     public function testSetWsdlViaOptionsArrayIsPossible()
     {
         $server = new Zend_Soap_Server();