From bd1d44767730d66b281fb5aab1c3d0280260d2b4 Mon Sep 17 00:00:00 2001 From: odain Date: Fri, 29 Nov 2024 12:08:16 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B07446=20-=20Fix=20in=20CI=20environment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/BaseTestCase/ItopCustomDatamodelTestCase.php | 1 - .../php-unit-tests/src/Service/UnitTestRunTimeEnvironment.php | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/php-unit-tests/src/BaseTestCase/ItopCustomDatamodelTestCase.php b/tests/php-unit-tests/src/BaseTestCase/ItopCustomDatamodelTestCase.php index c50335f07..f7bfd7369 100644 --- a/tests/php-unit-tests/src/BaseTestCase/ItopCustomDatamodelTestCase.php +++ b/tests/php-unit-tests/src/BaseTestCase/ItopCustomDatamodelTestCase.php @@ -137,7 +137,6 @@ abstract class ItopCustomDatamodelTestCase extends ItopDataTestCase $sConfFile = utils::GetConfigFilePath($sTestEnv); $sConfFolder = dirname($sConfFile); if (is_file($sConfFile)) { - chmod($sConfFile, 0777); SetupUtils::tidydir($sConfFolder); } diff --git a/tests/php-unit-tests/src/Service/UnitTestRunTimeEnvironment.php b/tests/php-unit-tests/src/Service/UnitTestRunTimeEnvironment.php index f630e1827..7cbe20215 100644 --- a/tests/php-unit-tests/src/Service/UnitTestRunTimeEnvironment.php +++ b/tests/php-unit-tests/src/Service/UnitTestRunTimeEnvironment.php @@ -129,6 +129,10 @@ class UnitTestRunTimeEnvironment extends RunTimeEnvironment if ($sClass === '') { continue; } + if (class_exists($sClass)) { + echo "class $sClass already loaded somehow \n"; + continue; + } require_once $sFile; $oReflectionClass = new ReflectionClass($sClass); if ($oReflectionClass->isAbstract()) {