diff options
author | Joas Schilling <coding@schilljs.com> | 2020-12-02 14:11:47 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-12-07 14:19:37 +0100 |
commit | fe9c46e595cba2d8e52db13cf15848a1f9d6f141 (patch) | |
tree | 3d52e51948a25b962e74c27dd6dc77ab36b54103 /apps/provisioning_api/tests | |
parent | eaba155a09ea7d226b538c5c8d046d2ea839b452 (diff) | |
download | nextcloud-server-fe9c46e595cba2d8e52db13cf15848a1f9d6f141.tar.gz nextcloud-server-fe9c46e595cba2d8e52db13cf15848a1f9d6f141.zip |
Add an endpoint to search for accounts based on phone number
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/provisioning_api/tests')
-rw-r--r-- | apps/provisioning_api/tests/Controller/UsersControllerTest.php | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/apps/provisioning_api/tests/Controller/UsersControllerTest.php b/apps/provisioning_api/tests/Controller/UsersControllerTest.php index 8bc60551005..db00963626c 100644 --- a/apps/provisioning_api/tests/Controller/UsersControllerTest.php +++ b/apps/provisioning_api/tests/Controller/UsersControllerTest.php @@ -52,11 +52,13 @@ use OCP\Accounts\IAccountManager; use OCP\App\IAppManager; use OCP\AppFramework\Http\DataResponse; use OCP\EventDispatcher\IEventDispatcher; +use OCP\Federation\ICloudIdManager; use OCP\IConfig; use OCP\IGroup; use OCP\IL10N; use OCP\ILogger; use OCP\IRequest; +use OCP\IURLGenerator; use OCP\IUser; use OCP\IUserManager; use OCP\IUserSession; @@ -86,6 +88,10 @@ class UsersControllerTest extends TestCase { protected $api; /** @var AccountManager|MockObject */ protected $accountManager; + /** @var ICloudIdManager|MockObject */ + protected $cloudIdManager; + /** @var IURLGenerator|MockObject */ + protected $urlGenerator; /** @var IRequest|MockObject */ protected $request; /** @var IFactory|MockObject */ @@ -112,6 +118,8 @@ class UsersControllerTest extends TestCase { $this->logger = $this->createMock(ILogger::class); $this->request = $this->createMock(IRequest::class); $this->accountManager = $this->createMock(AccountManager::class); + $this->cloudIdManager = $this->createMock(ICloudIdManager::class); + $this->urlGenerator = $this->createMock(IURLGenerator::class); $this->l10nFactory = $this->createMock(IFactory::class); $this->newUserMailHelper = $this->createMock(NewUserMailHelper::class); $this->federatedShareProviderFactory = $this->createMock(FederatedShareProviderFactory::class); @@ -129,6 +137,8 @@ class UsersControllerTest extends TestCase { $this->groupManager, $this->userSession, $this->accountManager, + $this->cloudIdManager, + $this->urlGenerator, $this->logger, $this->l10nFactory, $this->newUserMailHelper, @@ -382,7 +392,7 @@ class UsersControllerTest extends TestCase { } public function testAddUserSuccessfulWithDisplayName() { - $api = $this->getMockBuilder('OCA\Provisioning_API\Controller\UsersController') + $api = $this->getMockBuilder(UsersController::class) ->setConstructorArgs([ 'provisioning_api', $this->request, @@ -392,6 +402,8 @@ class UsersControllerTest extends TestCase { $this->groupManager, $this->userSession, $this->accountManager, + $this->cloudIdManager, + $this->urlGenerator, $this->logger, $this->l10nFactory, $this->newUserMailHelper, @@ -3163,7 +3175,7 @@ class UsersControllerTest extends TestCase { ->willReturn($user); /** @var UsersController | MockObject $api */ - $api = $this->getMockBuilder('OCA\Provisioning_API\Controller\UsersController') + $api = $this->getMockBuilder(UsersController::class) ->setConstructorArgs([ 'provisioning_api', $this->request, @@ -3173,6 +3185,8 @@ class UsersControllerTest extends TestCase { $this->groupManager, $this->userSession, $this->accountManager, + $this->cloudIdManager, + $this->urlGenerator, $this->logger, $this->l10nFactory, $this->newUserMailHelper, @@ -3228,7 +3242,7 @@ class UsersControllerTest extends TestCase { public function testGetUser() { /** @var UsersController | MockObject $api */ - $api = $this->getMockBuilder('OCA\Provisioning_API\Controller\UsersController') + $api = $this->getMockBuilder(UsersController::class) ->setConstructorArgs([ 'provisioning_api', $this->request, @@ -3238,6 +3252,8 @@ class UsersControllerTest extends TestCase { $this->groupManager, $this->userSession, $this->accountManager, + $this->cloudIdManager, + $this->urlGenerator, $this->logger, $this->l10nFactory, $this->newUserMailHelper, |