Skip to content

Commit cf3fd88

Browse files
committed
fix: unit tests
Signed-off-by: Jana Peper <jana.peper@nextcloud.com>
1 parent c1c99c2 commit cf3fd88

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

apps/provisioning_api/tests/Controller/UsersControllerTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
use OCP\Accounts\IAccountManager;
2121
use OCP\Accounts\IAccountProperty;
2222
use OCP\Accounts\IAccountPropertyCollection;
23+
use OCP\App\IAppManager;
2324
use OCP\AppFramework\Http\DataResponse;
2425
use OCP\AppFramework\OCS\OCSException;
2526
use OCP\EventDispatcher\IEventDispatcher;
@@ -64,6 +65,7 @@ class UsersControllerTest extends TestCase {
6465
private IEventDispatcher&MockObject $eventDispatcher;
6566
private IRootFolder $rootFolder;
6667
private IPhoneNumberUtil $phoneNumberUtil;
68+
private IAppManager $appManager;
6769

6870
protected function setUp(): void {
6971
parent::setUp();
@@ -84,6 +86,7 @@ protected function setUp(): void {
8486
$this->knownUserService = $this->createMock(KnownUserService::class);
8587
$this->eventDispatcher = $this->createMock(IEventDispatcher::class);
8688
$this->phoneNumberUtil = new PhoneNumberUtil();
89+
$this->appManager = $this->createMock(IAppManager::class);
8790
$this->rootFolder = $this->createMock(IRootFolder::class);
8891

8992
$l10n = $this->createMock(IL10N::class);
@@ -110,6 +113,7 @@ protected function setUp(): void {
110113
$this->knownUserService,
111114
$this->eventDispatcher,
112115
$this->phoneNumberUtil,
116+
$this->appManager,
113117
])
114118
->onlyMethods(['fillStorageInfo'])
115119
->getMock();
@@ -501,6 +505,7 @@ public function testAddUserSuccessfulWithDisplayName(): void {
501505
$this->knownUserService,
502506
$this->eventDispatcher,
503507
$this->phoneNumberUtil,
508+
$this->appManager,
504509
])
505510
->onlyMethods(['editUser'])
506511
->getMock();
@@ -3796,6 +3801,7 @@ public function testGetCurrentUserLoggedIn(): void {
37963801
$this->knownUserService,
37973802
$this->eventDispatcher,
37983803
$this->phoneNumberUtil,
3804+
$this->appManager,
37993805
])
38003806
->onlyMethods(['getUserData'])
38013807
->getMock();
@@ -3887,6 +3893,7 @@ public function testGetUser(): void {
38873893
$this->knownUserService,
38883894
$this->eventDispatcher,
38893895
$this->phoneNumberUtil,
3896+
$this->appManager,
38903897
])
38913898
->onlyMethods(['getUserData'])
38923899
->getMock();

0 commit comments

Comments
 (0)