From bbfa601ab1b0c07de433ea1f0fc5754c68c5082d Mon Sep 17 00:00:00 2001 From: Molkobain Date: Fri, 12 Apr 2024 09:58:49 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B07446=20-=20Add=20temporary=20workaround?= =?UTF-8?q?=20to=20fix=20an=20issue=20due=20to=20DB=20views=20creation.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/BaseTestCase/ItopCustomDatamodelTestCase.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/php-unit-tests/src/BaseTestCase/ItopCustomDatamodelTestCase.php b/tests/php-unit-tests/src/BaseTestCase/ItopCustomDatamodelTestCase.php index da53441af..b7e62717b 100644 --- a/tests/php-unit-tests/src/BaseTestCase/ItopCustomDatamodelTestCase.php +++ b/tests/php-unit-tests/src/BaseTestCase/ItopCustomDatamodelTestCase.php @@ -191,7 +191,8 @@ abstract class ItopCustomDatamodelTestCase extends ItopDataTestCase CMDBSource::CreateDB($oTestConfig->Get('db_name')); MetaModel::Startup($sConfFile, false /* $bModelOnly */, true /* $bAllowCache */, false /* $bTraceSourceFiles */, $sTestEnv); // N°7446 For some reason we need to create the DB schema before starting the MM, then only we can create the tables. - MetaModel::DBCreate(); + // In 2.7, we can't call MetaModel::DBCreate() directly as the views creation will fail + $this->InvokeNonPublicStaticMethod(MetaModel::class, 'DBCreateTables', []); $this->MarkEnvironmentReady(); $this->debug('Preparation of custom environment "'.$sTestEnv.'" done.');