fix: unit tests

Signed-off-by: Jana Peper <jana.peper@nextcloud.com>
pull/53599/head
Jana Peper 2025-06-18 17:20:04 +07:00
parent 326cb9c75c
commit 9a3d5e4b92
No known key found for this signature in database
GPG Key ID: 21BB61ACAFC2C89E
1 changed files with 8 additions and 0 deletions

@ -20,6 +20,7 @@ use OCP\Accounts\IAccount;
use OCP\Accounts\IAccountManager;
use OCP\Accounts\IAccountProperty;
use OCP\Accounts\IAccountPropertyCollection;
use OCP\App\IAppManager;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\OCS\OCSException;
use OCP\EventDispatcher\IEventDispatcher;
@ -81,6 +82,8 @@ class UsersControllerTest extends TestCase {
private IRootFolder $rootFolder;
/** @var IPhoneNumberUtil */
private $phoneNumberUtil;
/** @var IAppManager|MockObject */
protected $appManager;
protected function setUp(): void {
parent::setUp();
@ -101,6 +104,7 @@ class UsersControllerTest extends TestCase {
$this->knownUserService = $this->createMock(KnownUserService::class);
$this->eventDispatcher = $this->createMock(IEventDispatcher::class);
$this->phoneNumberUtil = new PhoneNumberUtil();
$this->appManager = $this->createMock(IAppManager::class);
$this->rootFolder = $this->createMock(IRootFolder::class);
$l10n = $this->createMock(IL10N::class);
@ -127,6 +131,7 @@ class UsersControllerTest extends TestCase {
$this->knownUserService,
$this->eventDispatcher,
$this->phoneNumberUtil,
$this->appManager,
])
->onlyMethods(['fillStorageInfo'])
->getMock();
@ -522,6 +527,7 @@ class UsersControllerTest extends TestCase {
$this->knownUserService,
$this->eventDispatcher,
$this->phoneNumberUtil,
$this->appManager,
])
->onlyMethods(['editUser'])
->getMock();
@ -3825,6 +3831,7 @@ class UsersControllerTest extends TestCase {
$this->knownUserService,
$this->eventDispatcher,
$this->phoneNumberUtil,
$this->appManager,
])
->onlyMethods(['getUserData'])
->getMock();
@ -3916,6 +3923,7 @@ class UsersControllerTest extends TestCase {
$this->knownUserService,
$this->eventDispatcher,
$this->phoneNumberUtil,
$this->appManager,
])
->onlyMethods(['getUserData'])
->getMock();