Merge remote-tracking branch 'origin/support/3.0' into support/3.1

# Conflicts:
#	datamodels/2.x/itop-core-update/dictionaries/pt_br.dict.itop-core-update.php
#	datamodels/2.x/itop-hub-connector/dictionaries/pl.dict.itop-hub-connector.php
#	datamodels/2.x/itop-hub-connector/dictionaries/pt_br.dict.itop-hub-connector.php
#	datamodels/2.x/itop-hub-connector/dictionaries/zh_cn.dict.itop-hub-connector.php
#	datamodels/2.x/itop-welcome-itil/dictionaries/tr.dict.itop-welcome-itil.php
This commit is contained in:
Pierre Goiffon
2024-01-15 15:43:51 +01:00
46 changed files with 49 additions and 41 deletions

View File

@@ -18,7 +18,6 @@ namespace Combodo\iTop\Test\UnitTest\Integration;
use Combodo\iTop\Test\UnitTest\ItopTestCase;
/**
* Wrapper to load dictionnary files without altering the main dictionnary
* Eval will be called within the current namespace (this is done by adding a "namespace" statement)
@@ -110,7 +109,7 @@ class DictionariesConsistencyTest extends ItopTestCase
{
$this->setUp();
$sAppRoot = $this->GetAppRoot();
$sAppRoot = static::GetAppRoot();
$aDictFiles = array_merge(
glob($sAppRoot.'datamodels/2.x/*/*.dict*.php'), // legacy form in modules
@@ -189,4 +188,13 @@ class DictionariesConsistencyTest extends ItopTestCase
}
$this->assertTrue(true);
}
public function testNoDictFileInDatamodelsModuleRootDirectory():void {
$sAppRoot = static::GetAppRoot();
$aDictFilesInDatamodelsModuleRootDir = glob($sAppRoot.'datamodels/2.x/*/*.dict*.php');
$this->assertNotFalse($aDictFilesInDatamodelsModuleRootDir, 'Searching for files returned an error');
$this->assertCount(0, $aDictFilesInDatamodelsModuleRootDir,
"There are some files in datamodels module root dirs ! You must move them to the `dictionaries` module subfolder. \n List of files: ".var_export($aDictFilesInDatamodelsModuleRootDir, true));
}
}