summaryrefslogtreecommitdiffstats
path: root/apps/provisioning_api/tests
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-12-01 14:33:22 +0100
committerJoas Schilling <coding@schilljs.com>2020-12-07 14:19:37 +0100
commitda9462b482c77b71d6623be43a6aa1eda3d7cc06 (patch)
treefe78e9c97f50180140fb222a8a0c41c3fcd8ddd8 /apps/provisioning_api/tests
parenteab710c2fd6febbf946be3ce8376fb386b61ee90 (diff)
downloadnextcloud-server-da9462b482c77b71d6623be43a6aa1eda3d7cc06.tar.gz
nextcloud-server-da9462b482c77b71d6623be43a6aa1eda3d7cc06.zip
Make code strict
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/provisioning_api/tests')
-rw-r--r--apps/provisioning_api/tests/Controller/GroupsControllerTest.php9
-rw-r--r--apps/provisioning_api/tests/Controller/UsersControllerTest.php49
2 files changed, 30 insertions, 28 deletions
diff --git a/apps/provisioning_api/tests/Controller/GroupsControllerTest.php b/apps/provisioning_api/tests/Controller/GroupsControllerTest.php
index 1973e6f8b6a..bb8ec854390 100644
--- a/apps/provisioning_api/tests/Controller/GroupsControllerTest.php
+++ b/apps/provisioning_api/tests/Controller/GroupsControllerTest.php
@@ -35,6 +35,7 @@ use OC\Group\Manager;
use OC\SubAdmin;
use OC\User\NoUserException;
use OCA\Provisioning_API\Controller\GroupsController;
+use OCP\Accounts\IAccountManager;
use OCP\IConfig;
use OCP\ILogger;
use OCP\IRequest;
@@ -185,10 +186,10 @@ class GroupsControllerTest extends \Test\TestCase {
->method('getUser')
->willReturnCallback(function (IUser $user) {
return [
- AccountManager::PROPERTY_PHONE => ['value' => '0800-call-' . $user->getUID()],
- AccountManager::PROPERTY_ADDRESS => ['value' => 'Holzweg 99, 0601 Herrera, Panama'],
- AccountManager::PROPERTY_WEBSITE => ['value' => 'https://' . $user->getUid() . '.pa'],
- AccountManager::PROPERTY_TWITTER => ['value' => '@' . $user->getUID()],
+ IAccountManager::PROPERTY_PHONE => ['value' => '0800-call-' . $user->getUID()],
+ IAccountManager::PROPERTY_ADDRESS => ['value' => 'Holzweg 99, 0601 Herrera, Panama'],
+ IAccountManager::PROPERTY_WEBSITE => ['value' => 'https://' . $user->getUid() . '.pa'],
+ IAccountManager::PROPERTY_TWITTER => ['value' => '@' . $user->getUID()],
];
});
}
diff --git a/apps/provisioning_api/tests/Controller/UsersControllerTest.php b/apps/provisioning_api/tests/Controller/UsersControllerTest.php
index d508670d4f6..8bc60551005 100644
--- a/apps/provisioning_api/tests/Controller/UsersControllerTest.php
+++ b/apps/provisioning_api/tests/Controller/UsersControllerTest.php
@@ -48,6 +48,7 @@ use OCA\FederatedFileSharing\FederatedShareProvider;
use OCA\Provisioning_API\Controller\UsersController;
use OCA\Provisioning_API\FederatedShareProviderFactory;
use OCA\Settings\Mailer\NewUserMailHelper;
+use OCP\Accounts\IAccountManager;
use OCP\App\IAppManager;
use OCP\AppFramework\Http\DataResponse;
use OCP\EventDispatcher\IEventDispatcher;
@@ -993,10 +994,10 @@ class UsersControllerTest extends TestCase {
->with($targetUser)
->willReturn(
[
- AccountManager::PROPERTY_ADDRESS => ['value' => 'address'],
- AccountManager::PROPERTY_PHONE => ['value' => 'phone'],
- AccountManager::PROPERTY_TWITTER => ['value' => 'twitter'],
- AccountManager::PROPERTY_WEBSITE => ['value' => 'website'],
+ IAccountManager::PROPERTY_ADDRESS => ['value' => 'address'],
+ IAccountManager::PROPERTY_PHONE => ['value' => 'phone'],
+ IAccountManager::PROPERTY_TWITTER => ['value' => 'twitter'],
+ IAccountManager::PROPERTY_WEBSITE => ['value' => 'website'],
]
);
$this->config
@@ -1162,10 +1163,10 @@ class UsersControllerTest extends TestCase {
->with($targetUser)
->willReturn(
[
- AccountManager::PROPERTY_ADDRESS => ['value' => 'address'],
- AccountManager::PROPERTY_PHONE => ['value' => 'phone'],
- AccountManager::PROPERTY_TWITTER => ['value' => 'twitter'],
- AccountManager::PROPERTY_WEBSITE => ['value' => 'website'],
+ IAccountManager::PROPERTY_ADDRESS => ['value' => 'address'],
+ IAccountManager::PROPERTY_PHONE => ['value' => 'phone'],
+ IAccountManager::PROPERTY_TWITTER => ['value' => 'twitter'],
+ IAccountManager::PROPERTY_WEBSITE => ['value' => 'website'],
]
);
@@ -1333,10 +1334,10 @@ class UsersControllerTest extends TestCase {
->with($targetUser)
->willReturn(
[
- AccountManager::PROPERTY_ADDRESS => ['value' => 'address'],
- AccountManager::PROPERTY_PHONE => ['value' => 'phone'],
- AccountManager::PROPERTY_TWITTER => ['value' => 'twitter'],
- AccountManager::PROPERTY_WEBSITE => ['value' => 'website'],
+ IAccountManager::PROPERTY_ADDRESS => ['value' => 'address'],
+ IAccountManager::PROPERTY_PHONE => ['value' => 'phone'],
+ IAccountManager::PROPERTY_TWITTER => ['value' => 'twitter'],
+ IAccountManager::PROPERTY_WEBSITE => ['value' => 'website'],
]
);
@@ -3566,22 +3567,22 @@ class UsersControllerTest extends TestCase {
return [
[false, false, []],
[false, true, [
- AccountManager::PROPERTY_PHONE,
- AccountManager::PROPERTY_ADDRESS,
- AccountManager::PROPERTY_WEBSITE,
- AccountManager::PROPERTY_TWITTER,
+ IAccountManager::PROPERTY_PHONE,
+ IAccountManager::PROPERTY_ADDRESS,
+ IAccountManager::PROPERTY_WEBSITE,
+ IAccountManager::PROPERTY_TWITTER,
]],
[ true, false, [
- AccountManager::PROPERTY_DISPLAYNAME,
- AccountManager::PROPERTY_EMAIL,
+ IAccountManager::PROPERTY_DISPLAYNAME,
+ IAccountManager::PROPERTY_EMAIL,
]],
[ true, true ,[
- AccountManager::PROPERTY_DISPLAYNAME,
- AccountManager::PROPERTY_EMAIL,
- AccountManager::PROPERTY_PHONE,
- AccountManager::PROPERTY_ADDRESS,
- AccountManager::PROPERTY_WEBSITE,
- AccountManager::PROPERTY_TWITTER,
+ IAccountManager::PROPERTY_DISPLAYNAME,
+ IAccountManager::PROPERTY_EMAIL,
+ IAccountManager::PROPERTY_PHONE,
+ IAccountManager::PROPERTY_ADDRESS,
+ IAccountManager::PROPERTY_WEBSITE,
+ IAccountManager::PROPERTY_TWITTER,
]]
];
}