ci: fix ItopDataTestCase CreateUser contactid unset

This commit is contained in:
odain
2022-10-26 14:03:11 +02:00
parent 6638eb4adc
commit c6e4466c53

View File

@@ -410,13 +410,14 @@ class ItopDataTestCase extends ItopTestCase
* @param string $sLogin
* @param int $iProfileId
*
* @return \DBObject
* @return \UserLocal
* @throws Exception
*/
protected function CreateUser($sLogin, $iProfileId, $sPassword=null, $iContactid=2)
{
$oUser = $this->CreateContactlessUser($sLogin, $iProfileId, $sPassword);
$oUser->Set('contactid', $iContactid);
$oUser->DBWrite();
return $oUser;
}
@@ -424,7 +425,7 @@ class ItopDataTestCase extends ItopTestCase
* @param string $sLogin
* @param int $iProfileId
*
* @return \DBObject
* @return \UserLocal
* @throws Exception
*/
protected function CreateContactlessUser($sLogin, $iProfileId, $sPassword=null)
@@ -437,6 +438,7 @@ class ItopDataTestCase extends ItopTestCase
$oUserProfile->Set('profileid', $iProfileId);
$oUserProfile->Set('reason', 'UNIT Tests');
$oSet = DBObjectSet::FromObject($oUserProfile);
/** @var \UserLocal $oUser */
$oUser = $this->createObject('UserLocal', array(
'login' => $sLogin,
'password' => $sPassword,