use new method GetOwnerOrganizationAttCode in Attachment

+ test
This commit is contained in:
Anne-Cath
2024-12-16 15:42:47 +01:00
parent add7743b6f
commit 3ff97be963
4 changed files with 66 additions and 56 deletions

View File

@@ -88,35 +88,4 @@ class InlineImageTest extends ItopDataTestCase
$this->assertEquals(0, $oInlineImage->Get('item_org_id'),'The org_id should be left undefined');
}
private function GivenUserLoggedInWithContact(int $iContactOrgId)
{
$iContactId = $this->GivenObjectInDB('Person', [
'first_name' => 'TestContact',
'name' => 'TestContact',
'org_id' => $iContactOrgId]);
$sLogin = 'demo_test_'.uniqid(__CLASS__, true);
$iUser = $this->GivenObjectInDB('UserLocal', [
'login' => $sLogin,
'password' => 'tagada-Secret,007',
'language' => 'EN US',
'contactid' => $iContactId,
'profile_list' => [
'profileid:'.self::$aURP_Profiles['Configuration Manager']
]
]);
\UserRights::Login($sLogin);
}
private function GivenUserLoggedInWithoutContact()
{
$sLogin = 'demo_test_'.uniqid(__CLASS__, true);
$iUser = $this->GivenObjectInDB('UserLocal', [
'login' => $sLogin,
'password' => 'tagada-Secret,007',
'language' => 'EN US',
'profile_list' => [
'profileid:'.self::$aURP_Profiles['Configuration Manager']
]
]);
\UserRights::Login($sLogin);
}
}