From d91eda13436292d8a809e7dab28d43efb2f59cef Mon Sep 17 00:00:00 2001 From: odain Date: Thu, 15 Jun 2023 15:07:09 +0200 Subject: [PATCH] ci: enhance AddProfileToUser to work with any User --- tests/php-unit-tests/ItopDataTestCase.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/php-unit-tests/ItopDataTestCase.php b/tests/php-unit-tests/ItopDataTestCase.php index d19c0a5cb..657521ef9 100644 --- a/tests/php-unit-tests/ItopDataTestCase.php +++ b/tests/php-unit-tests/ItopDataTestCase.php @@ -48,6 +48,7 @@ use Server; use TagSetFieldData; use Ticket; use URP_UserProfile; +use User; use UserRequest; use VirtualHost; use VirtualMachine; @@ -482,7 +483,7 @@ class ItopDataTestCase extends ItopTestCase /** @var \ormLinkSet $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()})");