Index: . =================================================================== --- . (revision 11496) +++ . (working copy) @@ -351,6 +351,40 @@ } } + public function testSetObject() + { + if (!extension_loaded('soap')) { + $this->markTestSkipped('SOAP Extension is not loaded'); + } + + $server = new Zend_Soap_Server(); + + try { + $server->setObject(465); + $this->fail('Non-object value should fail'); + } catch (Exception $e) { + // success + } + + try { + $int = 1; + $server->setObject($int); + $this->fail('Invalid argument should fail'); + } catch (Exception $e) { + // success + } + + // Correct class name should pass + $server->setObject(new Zend_Soap_Server_TestClass()); + + try { + $server->setObject(new Zend_Soap_Server_TestClass()); + $this->fail('setClass() should pass only once'); + } catch (Exception $e) { + // success + } + } + public function testGetFunctions() { if (!extension_loaded('soap')) {