Browse Source

[TESTS] Fixed two PHP 5.3 issues in test suite

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@17006 44c647ce-9c0f-0410-b52a-842ac1e357ba
matthew 16 years ago
parent
commit
298e052713
2 changed files with 10 additions and 5 deletions
  1. 4 2
      tests/Zend/Amf/ServerTest.php
  2. 6 3
      tests/Zend/Soap/ServerTest.php

+ 4 - 2
tests/Zend/Amf/ServerTest.php

@@ -33,7 +33,7 @@ class Zend_Amf_ServerTest extends PHPUnit_Framework_TestCase
         Zend_Amf_Parse_TypeLoader::resetMap();
     }
 
-    public function testDown()
+    public function tearDown()
     {
         unset($this->_server);
         //Zend_Amf_Parse_TypeLoader::resetMap();
@@ -993,7 +993,8 @@ class Zend_Amf_ServerTest extends PHPUnit_Framework_TestCase
     {
     	$this->_server->addDirectory(dirname(__FILE__)."/_files/services");
     	// should take it from the path above, not include path
-    	set_include_path(get_include_path().PATH_SEPARATOR.dirname(__FILE__));
+        $origPath = get_include_path();
+    	set_include_path($origPath.PATH_SEPARATOR.dirname(__FILE__));
     	// create a mock remoting message
         $message = new Zend_Amf_Value_Messaging_RemotingMessage();
         $message->operation = 'getMenu';
@@ -1007,6 +1008,7 @@ class Zend_Amf_ServerTest extends PHPUnit_Framework_TestCase
         $request->setObjectEncoding(0x03);
         // let the server handle mock request
         $this->_server->handle($request);
+        set_include_path($origPath);
         $response = $this->_server->getResponse()->getAMFBodies();
         $this->assertTrue($response[0]->getData() instanceof Zend_Amf_Value_Messaging_AcknowledgeMessage);
         $this->assertEquals("Service: MenuC", $response[0]->getData()->body);

+ 6 - 3
tests/Zend/Soap/ServerTest.php

@@ -882,7 +882,8 @@ class Zend_Soap_ServerTest extends PHPUnit_Framework_TestCase
 if (extension_loaded('soap')) {
 
 /** Local SOAP client */
-class Zend_Soap_Server_TestLocalSoapClient extends SoapClient {
+class Zend_Soap_Server_TestLocalSoapClient extends SoapClient 
+{
 	/**
 	 * Server object
 	 *
@@ -897,12 +898,14 @@ class Zend_Soap_Server_TestLocalSoapClient extends SoapClient {
 	 * @param string $wsdl
 	 * @param array $options
 	 */
-    function __construct(Zend_Soap_Server $server, $wsdl, $options) {
+    function __construct(Zend_Soap_Server $server, $wsdl, $options) 
+    {
         $this->server = $server;
     	parent::__construct($wsdl, $options);
     }
 
-    function __doRequest($request, $location, $action, $version) {
+    function __doRequest($request, $location, $action, $version, $one_way = 0) 
+    {
         ob_start();
         $this->server->handle($request);
         $response = ob_get_clean();