mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-02 15:08:45 +02:00
✅ Fix CI
This commit is contained in:
@@ -37,7 +37,8 @@ class DashboardSerializerTest extends ItopDataTestCase
|
||||
$oRootNode->setAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');
|
||||
$oDOMDocument->appendChild($oRootNode);
|
||||
|
||||
Combodo\iTop\PropertyType\Serializer\XMLSerializer::GetInstance()->Serialize($normalizedValue, $oRootNode, 'DashboardGrid', 'Dashboard');
|
||||
$oXMLSerializer = MetaModel::GetService('XMLSerializer');
|
||||
$oXMLSerializer->Serialize($normalizedValue, $oRootNode, 'DashboardGrid', 'Dashboard');
|
||||
|
||||
$sActualXML = $oDOMDocument->saveXML();
|
||||
|
||||
|
||||
@@ -24,7 +24,8 @@ class FormsCompilerTest extends ItopDataTestCase
|
||||
*/
|
||||
public function testCompileFormFromXML(string $sXMLContent, string $sExpectedPHP)
|
||||
{
|
||||
$sProducedPHP = PropertyTypeCompiler::GetInstance()->CompileFormFromXML($sXMLContent);
|
||||
$oCompiler = MetaModel::GetService('PropertyTypeCompiler');
|
||||
$sProducedPHP = $oCompiler->CompileFormFromXML($sXMLContent);
|
||||
|
||||
$this->AssertPHPCodeIsValid($sProducedPHP);
|
||||
$sMessage = $this->dataName();
|
||||
@@ -669,7 +670,8 @@ PHP,
|
||||
{
|
||||
$this->expectException($sExpectedClass);
|
||||
$this->expectExceptionMessage($sExpectedMessage);
|
||||
PropertyTypeCompiler::GetInstance()->CompileFormFromXML($sXMLContent);
|
||||
$oCompiler = MetaModel::GetService('PropertyTypeCompiler');
|
||||
$oCompiler->CompileFormFromXML($sXMLContent);
|
||||
}
|
||||
|
||||
public function CompileFormFromInvalidXMLProvider()
|
||||
@@ -885,7 +887,8 @@ class FormFor__basic_test_for_icon extends Combodo\iTop\Forms\Block\Base\FormBlo
|
||||
|
||||
PHP;
|
||||
|
||||
$sProducedPHP = PropertyTypeCompiler::GetInstance()->CompileFormFromXML($sXMLContent);
|
||||
$oCompiler = MetaModel::GetService('PropertyTypeCompiler');
|
||||
$sProducedPHP = $oCompiler->CompileFormFromXML($sXMLContent);
|
||||
|
||||
$this->AssertPHPCodeIsValid($sProducedPHP);
|
||||
$this->assertStringStartsWith($sExpectedStart, $sProducedPHP);
|
||||
@@ -920,7 +923,8 @@ class FormFor__basic_test_for_class extends Combodo\iTop\Forms\Block\Base\FormBl
|
||||
|
||||
PHP;
|
||||
|
||||
$sProducedPHP = PropertyTypeCompiler::GetInstance()->CompileFormFromXML($sXMLContent);
|
||||
$oCompiler = MetaModel::GetService('PropertyTypeCompiler');
|
||||
$sProducedPHP = $oCompiler->CompileFormFromXML($sXMLContent);
|
||||
|
||||
$this->AssertPHPCodeIsValid($sProducedPHP);
|
||||
$this->assertStringStartsWith($sExpectedStart, $sProducedPHP);
|
||||
|
||||
@@ -34,7 +34,8 @@ class XMLSerializerTest extends ItopDataTestCase
|
||||
|
||||
$oDOMDocument->appendChild($oRootNode);
|
||||
|
||||
Combodo\iTop\PropertyType\Serializer\XMLSerializer::GetInstance()->SerializeForPropertyType($normalizedValue, $oRootNode, $sPropertyTypeXML);
|
||||
$oXMLSerializer = MetaModel::GetService('XMLSerializer');
|
||||
$oXMLSerializer->SerializeForPropertyType($normalizedValue, $oRootNode, $sPropertyTypeXML);
|
||||
|
||||
$sActualXML = $oDOMDocument->saveXML();
|
||||
|
||||
@@ -372,7 +373,8 @@ XML,
|
||||
/** @var \Combodo\iTop\DesignElement $oRoot */
|
||||
$oRoot = $oDoc->firstChild;
|
||||
|
||||
$aActualValue = Combodo\iTop\PropertyType\Serializer\XMLSerializer::GetInstance()->DeserializeForPropertyType($oRoot, $sPropertyTypeXML);
|
||||
$oXMLSerializer = MetaModel::GetService('XMLSerializer');
|
||||
$aActualValue = $oXMLSerializer->DeserializeForPropertyType($oRoot, $sPropertyTypeXML);
|
||||
|
||||
$this->assertEquals($normalizedValue, $aActualValue);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user