From 7ffddbb6338019ca5972d0808d986a798688763e Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Mon, 19 Jan 2026 17:58:36 +0100 Subject: [PATCH] :white_check_mark: Fix CI --- bootstrap.inc.php | 13 +++++++++++++ core/modelreflection.class.inc.php | 13 ------------- sources/Application/Dashboard/Dashboard.php | 2 -- .../Dashboard/ValueType/DashboardSerializerTest.php | 7 +++++-- 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/bootstrap.inc.php b/bootstrap.inc.php index 29dacb113..2566d6ad1 100644 --- a/bootstrap.inc.php +++ b/bootstrap.inc.php @@ -42,6 +42,19 @@ define('ITOP_DEFAULT_ENV', 'production'); define('MAINTENANCE_MODE_FILE', APPROOT.'data/.maintenance'); define('READONLY_MODE_FILE', APPROOT.'data/.readonly'); +/** + * Exclude the parent class from the list + * + * @package iTopORM + */ +define('ENUM_CHILD_CLASSES_EXCLUDETOP', 1); +/** + * Include the parent class in the list + * + * @package iTopORM + */ +define('ENUM_CHILD_CLASSES_ALL', 2); + $fItopStarted = microtime(true); $iItopInitialMemory = memory_get_usage(true); diff --git a/core/modelreflection.class.inc.php b/core/modelreflection.class.inc.php index 4722eac57..d16f8afe3 100644 --- a/core/modelreflection.class.inc.php +++ b/core/modelreflection.class.inc.php @@ -24,19 +24,6 @@ * @license http://opensource.org/licenses/AGPL-3.0 */ -/** - * Exclude the parent class from the list - * - * @package iTopORM - */ -define('ENUM_CHILD_CLASSES_EXCLUDETOP', 1); -/** - * Include the parent class in the list - * - * @package iTopORM -*/ -define('ENUM_CHILD_CLASSES_ALL', 2); - abstract class ModelReflection { abstract public function GetClassIcon($sClass, $bImgTag = true); diff --git a/sources/Application/Dashboard/Dashboard.php b/sources/Application/Dashboard/Dashboard.php index dfa7c399f..af626d87a 100644 --- a/sources/Application/Dashboard/Dashboard.php +++ b/sources/Application/Dashboard/Dashboard.php @@ -30,8 +30,6 @@ use MetaModel; use ReflectionClass; use utils; -require_once(APPROOT.'core/modelreflection.class.inc.php'); - /** * * A user editable dashboard page diff --git a/tests/php-unit-tests/unitary-tests/sources/Application/Dashboard/ValueType/DashboardSerializerTest.php b/tests/php-unit-tests/unitary-tests/sources/Application/Dashboard/ValueType/DashboardSerializerTest.php index 8fa0fd648..dfe1d36d3 100644 --- a/tests/php-unit-tests/unitary-tests/sources/Application/Dashboard/ValueType/DashboardSerializerTest.php +++ b/tests/php-unit-tests/unitary-tests/sources/Application/Dashboard/ValueType/DashboardSerializerTest.php @@ -36,12 +36,15 @@ class DashboardSerializerTest extends ItopDataTestCase /** @var \Combodo\iTop\DesignElement $oRootNode */ $oRootNode = $oDOMDocument->createElement('root'); + $oRootNode->setAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance'); $oDOMDocument->appendChild($oRootNode); - Combodo\iTop\PropertyType\Serializer\XMLSerializer::GetInstance()->Serialize($normalizedValue, $oRootNode, 'DashboardDefinition', 'Dashboard'); + Combodo\iTop\PropertyType\Serializer\XMLSerializer::GetInstance()->Serialize($normalizedValue, $oRootNode, 'DashboardGrid', 'Dashboard'); $sActualXML = $oDOMDocument->saveXML(); + var_export($sActualXML); + $this->AssertEqualiTopXML($sXMLContent, $sActualXML); } @@ -72,7 +75,7 @@ class DashboardSerializerTest extends ItopDataTestCase ], 'sXMLContent' => << - + Bienvenido al Panel de Control Panel 60