mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 02:58:43 +02:00
Merge remote-tracking branch 'origin/support/3.0' into support/3.1
This commit is contained in:
@@ -143,6 +143,7 @@ abstract class ItopDataTestCase extends ItopTestCase
|
|||||||
// Leave the place clean
|
// Leave the place clean
|
||||||
\UserRights::Logoff();
|
\UserRights::Logoff();
|
||||||
$this->SetNonPublicStaticProperty(UserRights::class, 'm_aCacheUsers', []);
|
$this->SetNonPublicStaticProperty(UserRights::class, 'm_aCacheUsers', []);
|
||||||
|
$this->ResetMetaModelQueyCacheGetObject();
|
||||||
|
|
||||||
foreach ($this->aEventListeners as $sListenerId) {
|
foreach ($this->aEventListeners as $sListenerId) {
|
||||||
EventService::UnRegisterListener($sListenerId);
|
EventService::UnRegisterListener($sListenerId);
|
||||||
@@ -153,6 +154,13 @@ abstract class ItopDataTestCase extends ItopTestCase
|
|||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper to reset the metamodel cache : for a class and a key it will contain the SQL query, that could include silo filter
|
||||||
|
*/
|
||||||
|
protected function ResetMetaModelQueyCacheGetObject() {
|
||||||
|
$this->SetNonPublicStaticProperty(MetaModel::class, 'aQueryCacheGetObject', []);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -671,14 +671,6 @@ class DBObjectTest extends ItopDataTestCase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Helper to reset the metamodel cache
|
|
||||||
* We might need to create something generic and add it to {@see UserRights::Logoff()} ?
|
|
||||||
*/
|
|
||||||
private function ResetMetaModelQueyCacheGetObject() {
|
|
||||||
$this->SetNonPublicStaticProperty(MetaModel::class, 'aQueryCacheGetObject', []);
|
|
||||||
}
|
|
||||||
|
|
||||||
private function CreateDemoOrgUser(Organization $oDemoOrg, string $sProfileId): User
|
private function CreateDemoOrgUser(Organization $oDemoOrg, string $sProfileId): User
|
||||||
{
|
{
|
||||||
utils::GetConfig()->SetModuleSetting('authent-local', 'password_validation.pattern', '');
|
utils::GetConfig()->SetModuleSetting('authent-local', 'password_validation.pattern', '');
|
||||||
|
|||||||
Reference in New Issue
Block a user