mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 10:38:45 +02:00
✅ N°6458 Tests : remove processIsolation
Was caused by cached User instances in UserRights + same login for each created User objects instances
This commit is contained in:
@@ -34,6 +34,7 @@ use TagSetFieldData;
|
||||
use Ticket;
|
||||
use URP_UserProfile;
|
||||
use User;
|
||||
use UserRights;
|
||||
use utils;
|
||||
use VirtualHost;
|
||||
use VirtualMachine;
|
||||
@@ -134,6 +135,7 @@ abstract class ItopDataTestCase extends ItopTestCase
|
||||
|
||||
// Leave the place clean
|
||||
\UserRights::Logoff();
|
||||
$this->SetNonPublicStaticProperty(UserRights::class, 'm_aCacheUsers', []);
|
||||
|
||||
foreach ($this->aEventListeners as $sListenerId) {
|
||||
EventService::UnRegisterListener($sListenerId);
|
||||
|
||||
@@ -300,7 +300,6 @@ class DBObjectTest extends ItopDataTestCase
|
||||
|
||||
/**
|
||||
* @covers DBObject::CheckChangedExtKeysValues()
|
||||
* @runInSeparateProcess MetaModel::GetObject returning wrong values :(
|
||||
*/
|
||||
public function testCheckExtKeysSiloOnAttributeExternalKey()
|
||||
{
|
||||
@@ -378,7 +377,6 @@ class DBObjectTest extends ItopDataTestCase
|
||||
|
||||
/**
|
||||
* @covers DBObject::CheckChangedExtKeysValues()
|
||||
* @runInSeparateProcess MetaModel::GetObject returning wrong values :(
|
||||
*/
|
||||
public function testCheckExtKeysOnAttributeLinkedSetIndirect()
|
||||
{
|
||||
@@ -480,7 +478,6 @@ class DBObjectTest extends ItopDataTestCase
|
||||
|
||||
/**
|
||||
* @covers DBObject::CheckChangedExtKeysValues()
|
||||
* @runInSeparateProcess MetaModel::GetObject returning wrong values :(
|
||||
*/
|
||||
public function testCheckExtKeysSiloOnAttributeObjectKey()
|
||||
{
|
||||
@@ -534,7 +531,7 @@ class DBObjectTest extends ItopDataTestCase
|
||||
private function CreateDemoOrgUser(Organization $oDemoOrg, string $sProfileId): User
|
||||
{
|
||||
utils::GetConfig()->SetModuleSetting('authent-local', 'password_validation.pattern', '');
|
||||
$oUserWithAllowedOrgs = $this->CreateContactlessUser('demo_test_' . __CLASS__, $sProfileId);
|
||||
$oUserWithAllowedOrgs = $this->CreateContactlessUser('demo_test_' . uniqid(__CLASS__, true), $sProfileId);
|
||||
/** @var \URP_UserOrg $oUserOrg */
|
||||
$oUserOrg = \MetaModel::NewObject('URP_UserOrg', ['allowed_org_id' => $oDemoOrg->GetKey(),]);
|
||||
$oAllowedOrgList = $oUserWithAllowedOrgs->Get('allowed_org_list');
|
||||
|
||||
Reference in New Issue
Block a user