Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-12-02 16:11:47 +0300
committerJoas Schilling <coding@schilljs.com>2020-12-07 16:19:37 +0300
commitfe9c46e595cba2d8e52db13cf15848a1f9d6f141 (patch)
tree3d52e51948a25b962e74c27dd6dc77ab36b54103 /apps/provisioning_api/tests
parenteaba155a09ea7d226b538c5c8d046d2ea839b452 (diff)
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.php22
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,