mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-19 00:28:47 +02:00
@@ -385,7 +385,7 @@ abstract class TestBizModel extends TestHandler
|
||||
|
||||
protected function DoPrepare()
|
||||
{
|
||||
MetaModel::Startup($this->GetConfigFile(), true); // Load model only
|
||||
MetaModel::Startup($this->GetConfigFile());
|
||||
// #@# Temporary disabled by Romain
|
||||
// MetaModel::CheckDefinitions();
|
||||
|
||||
|
||||
@@ -1323,7 +1323,7 @@ $aWebServices = array(
|
||||
'admin', /* sPassword */
|
||||
'PC burning', /* sDescription */
|
||||
'The power supply suddenly started to warm up', /* sInitialSituation */
|
||||
null, /* aCallerDesc */
|
||||
new SOAPExternalKeySearch(), /* aCallerDesc */
|
||||
new SOAPExternalKeySearch(array(new SOAPSearchCondition('id', 2))), /* aCustomerDesc */
|
||||
new SOAPExternalKeySearch(array(new SOAPSearchCondition('id', 4))), /* aServiceDesc */
|
||||
new SOAPExternalKeySearch(array(new SOAPSearchCondition('id', 1))), /* aServiceSubcategoryDesc */
|
||||
@@ -1402,7 +1402,8 @@ $aWebServices = array(
|
||||
new SOAPExternalKeySearch(array(new SOAPSearchCondition('id', 1))), /* aServiceSubcategoryDesc */
|
||||
'sub product of the service', /* sProduct */
|
||||
new SOAPExternalKeySearch(array(new SOAPSearchCondition('name', 'FLS Desktop'))), /* aWorkgroupDesc */
|
||||
null, /* aImpact */
|
||||
array(
|
||||
), /* aImpact */
|
||||
'1', /* sImpact */
|
||||
'1', /* sUrgency */
|
||||
),
|
||||
@@ -1581,8 +1582,9 @@ class TestWebServicesDirect extends TestBizModel
|
||||
$oWebServices = new WebServices();
|
||||
|
||||
global $aWebServices;
|
||||
foreach ($aWebServices as $aWebService)
|
||||
foreach ($aWebServices as $i => $aWebService)
|
||||
{
|
||||
echo "<h2>Test #$i - {$aWebService['verb']} </h2>\n";
|
||||
$oRes = call_user_func_array(array($oWebServices, $aWebService['verb']), $aWebService['args']);
|
||||
echo "<pre>\n";
|
||||
print_r($oRes);
|
||||
|
||||
@@ -44,10 +44,16 @@ class SOAPExternalKeySearch
|
||||
{
|
||||
public $conditions; // array of SOAPSearchCondition
|
||||
|
||||
public function __construct($aConditions)
|
||||
public function __construct($aConditions = null)
|
||||
{
|
||||
$this->conditions = $aConditions;
|
||||
}
|
||||
|
||||
public function IsVoid()
|
||||
{
|
||||
if (is_null($this->conditions)) return true;
|
||||
if (count($this->conditions) == 0) return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -500,7 +500,7 @@ class WebServices
|
||||
|
||||
static protected function SoapStructToExternalKeySearch(SoapExternalKeySearch $oExternalKeySearch)
|
||||
{
|
||||
if (is_null($oExternalKeySearch)) return null;
|
||||
if ($oExternalKeySearch->IsVoid()) return null;
|
||||
|
||||
$aRes = array();
|
||||
foreach($oExternalKeySearch->conditions as $oSearchCondition)
|
||||
|
||||
Reference in New Issue
Block a user