enhance test framework: let AddProfileToUser work on any User not only UserLocal

This commit is contained in:
odain
2022-12-21 15:22:52 +01:00
parent 973c435138
commit 9bbc7342b8

View File

@@ -27,8 +27,8 @@ namespace Combodo\iTop\Test\UnitTest;
*/
use ArchivedObjectException;
use CMDBSource;
use CMDBObject;
use CMDBSource;
use Contact;
use DBObject;
use DBObjectSet;
@@ -465,7 +465,7 @@ class ItopDataTestCase extends ItopTestCase
/** @var DBObjectSet $oSet */
$oSet = $oUser->Get('profile_list');
$oSet->AddItem($oUserProfile);
$oUser = $this->updateObject('UserLocal', $oUser->GetKey(), array(
$oUser = $this->updateObject(\User::class, $oUser->GetKey(), array(
'profile_list' => $oSet,
));
$this->debug("Updated {$oUser->GetName()} ({$oUser->GetKey()})");