I have Zend_Soap_Server. It should be tested. One issue - unit testing and development modes should work with different databases. It can be done via .htaccess:
SetEnvIfNoCase User-Agent (.*) APPLICATION_ENV=development
SetEnvIfNoCase User-Agent testing APPLICATION_ENV=testing
It would work fine for me, I use Zend_Soap_Client as is for development/production mode, and add extra parameter for testing. There are no special changes in source code for testing support. The issue - I can't set custom user-agent for (Zend_Soap_Client It seems as this parameter isn't supported or isn't documented. I tried to do the same thing via mod_rewrite and adding
new Zend_Soap_Client('...?wsdl&testing');
but it requires to change Zend_Soap_Server to support testing Query_String, otherwise soap-actions aren't reflected with 'testing' outside of wsdl. It's not good in my opinion.
I agree it's a bit more related with acceptance testing, not unit (I have tests for classes such as $server->setClass('classWS')
), but anyway, I need it regardless of terminology.
So, what would work fine for me is something like:
new Zend_Soap_Client($wsdl, array('useragent' => 'testing'));
in tests.