N°8760 - Audit uninstall of extensions that declare final classes

N°8760 - be able to list modules based on extension choices
refactoring: move some classes in a moduleinstallation folder (coming
namespace)

N°8760 - module dependency check applied before audit

N°8760 - make dependency check work during audit

N°8760 - fix ci

N°8760 - fix ci

N°8760 - add GetCreatedIn to get module name based on DBObject class - everything stored in MetaModel during compilation and autoload

N°8760 - be able to describe from which module a datamodel class comes via MetaModel created_in field

N°8760 - rename GetCreatedIn <- GetModuleName + compute module name live instead having complex stuff in MetaModel/compilation

temp review 1

review: renaming InstallationChoicesToModuleConverter

review: renaming InstallationChoicesToModuleConverter

review: ModuleDiscovery:GetModulesOrderedByDependencies replacing deprecated GetAvailableModules method

ci: fix typo

cleanup

review: rework InstallationChoicesToModuleConverter

N°8760 - review tests
This commit is contained in:
odain
2026-01-21 17:00:24 +01:00
committed by Timothee
parent cac6fa4ff7
commit e1ea93c8f2
30 changed files with 1139 additions and 119 deletions

View File

@@ -498,6 +498,34 @@ class MetaModelTest extends ItopDataTestCase
'Purge 10 items with a max_chunk_size of 1000 (default value) should be perfomed in 1 step' => [1000, 3],
];
}
public function testGetCreatedIn_UnknownClass()
{
$this->expectExceptionMessage("Cannot find class module");
$this->expectException(CoreException::class);
MetaModel::GetModuleName('GABUZOMEU');
}
public function testGetCreatedIn_ClassComingFromCorePhpFile()
{
$this->assertEquals('core', MetaModel::GetModuleName('BackgroundTask'));
}
public function testGetCreatedIn_ClassComingFromCorePhpFile2()
{
$this->assertEquals('core', MetaModel::GetModuleName('lnkActionNotificationToContact'));
}
public function testGetCreatedIn_ClassComingFromModulePhpFile()
{
$this->assertEquals('itop-attachments', MetaModel::GetModuleName('CMDBChangeOpAttachmentAdded'));
}
public function testGetCreatedIn_ClassComingFromXmlDataModelFile()
{
$this->assertEquals('authent-ldap', MetaModel::GetModuleName('UserLDAP'));
}
}
abstract class Wizzard