N°6408 - CRUD : rework on DBUpdate reentrancy

This commit is contained in:
Eric Espie
2023-06-27 11:37:03 +02:00
parent ccf1d7ecfb
commit 86ca7fcb7a
7 changed files with 493 additions and 384 deletions

View File

@@ -44,6 +44,7 @@ use lnkContactToTicket;
use lnkFunctionalCIToTicket;
use MetaModel;
use Person;
use PluginManager;
use Server;
use TagSetFieldData;
use Ticket;
@@ -146,6 +147,24 @@ class ItopDataTestCase extends ItopTestCase
return $this->iTestOrgId;
}
/////////////////////////////////////////////////////////////////////////////
/// MetaModel Utilities
/////////////////////////////////////////////////////////////////////////////
/**
* Allow test iApplicationObjectExtension objects to be added to the list of plugins without setup
* just require the class file containing the object implementing iApplicationObjectExtension before calling ResetApplicationObjectExtensions()
*
* @return void
*/
protected function ResetApplicationObjectExtensions()
{
// Add ObjectModifyExtension to the plugin list
$this->InvokeNonPublicStaticMethod(MetaModel::class, 'InitExtensions', []);
// Instantiate the new object
$this->InvokeNonPublicStaticMethod(PluginManager::class, 'ResetPlugins', []);
}
/////////////////////////////////////////////////////////////////////////////
/// Database Utilities
/////////////////////////////////////////////////////////////////////////////