mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-27 22:24:12 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user