Added phing for running tests & fixed issues in order to pass the tests

This commit is contained in:
Petr Bechyně
2017-06-07 15:50:04 +02:00
parent b9e36b4900
commit 2264e329a1
47 changed files with 1349 additions and 394 deletions

View File

@ -14,6 +14,7 @@ namespace BeSimple\SoapServer;
use BeSimple\SoapCommon\SoapOptions\SoapOptions;
use BeSimple\SoapServer\SoapOptions\SoapServerOptions;
use Exception;
/**
* SoapServerBuilder provides a SoapServer instance from SoapServerOptions and SoapOptions.
@ -40,9 +41,16 @@ class SoapServerBuilder
}
if ($soapServerOptions->hasHandlerClass()) {
$server->setClass($soapServerOptions->getHandlerClass());
} else if ($soapServerOptions->hasHandlerObject()) {
}
if ($soapServerOptions->hasHandlerObject()) {
$server->setObject($soapServerOptions->getHandlerObject());
}
if ($soapServerOptions->hasHandlerClass() && $soapServerOptions->hasHandlerObject()) {
throw new Exception(
'Could not create SoapServer: HandlerClass and HandlerObject are set: please specify only one'
);
}
return $server;
}