aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPytal <24800714+Pytal@users.noreply.github.com>2022-03-17 21:35:58 -0700
committerGitHub <noreply@github.com>2022-03-17 21:35:58 -0700
commitb0fbcccfe66474d79586001ce9509d346919ae74 (patch)
tree3c2d3f2382b83eb93cae4f974d20bbbbe2b9789b /tests
parentd364edcf6a18fa237dc53f6b95614851ed5fdc9a (diff)
parent108abd77ed0ee29bca4019f6a212ba1b2bdad5e7 (diff)
downloadnextcloud-server-b0fbcccfe66474d79586001ce9509d346919ae74.tar.gz
nextcloud-server-b0fbcccfe66474d79586001ce9509d346919ae74.zip
Merge pull request #29372 from nextcloud/feat/28139/global-profile-toggle
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Accounts/AccountManagerTest.php6
-rw-r--r--tests/lib/Contacts/ContactsMenu/ContactsStoreTest.php10
2 files changed, 11 insertions, 5 deletions
diff --git a/tests/lib/Accounts/AccountManagerTest.php b/tests/lib/Accounts/AccountManagerTest.php
index 18419d73423..9d54ef36c80 100644
--- a/tests/lib/Accounts/AccountManagerTest.php
+++ b/tests/lib/Accounts/AccountManagerTest.php
@@ -511,6 +511,12 @@ class AccountManagerTest extends TestCase {
public function testAddMissingDefaults() {
$user = $this->createMock(IUser::class);
+ $this->config
+ ->expects($this->once())
+ ->method('getAppValue')
+ ->with('settings', 'profile_enabled_by_default', '1')
+ ->willReturn('1');
+
$input = [
[
'name' => IAccountManager::PROPERTY_DISPLAYNAME,
diff --git a/tests/lib/Contacts/ContactsMenu/ContactsStoreTest.php b/tests/lib/Contacts/ContactsMenu/ContactsStoreTest.php
index 98a31254c3e..bd82c203ff5 100644
--- a/tests/lib/Contacts/ContactsMenu/ContactsStoreTest.php
+++ b/tests/lib/Contacts/ContactsMenu/ContactsStoreTest.php
@@ -27,7 +27,7 @@ namespace Tests\Contacts\ContactsMenu;
use OC\Contacts\ContactsMenu\ContactsStore;
use OC\KnownUser\KnownUserService;
-use OCP\Accounts\IAccountManager;
+use OC\Profile\ProfileManager;
use OCP\Contacts\IManager;
use OCP\IConfig;
use OCP\IGroupManager;
@@ -39,12 +39,12 @@ use PHPUnit\Framework\MockObject\MockObject;
use Test\TestCase;
class ContactsStoreTest extends TestCase {
- /** @var IAccountManager */
- private $accountManager;
/** @var ContactsStore */
private $contactsStore;
/** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
private $contactsManager;
+ /** @var ProfileManager */
+ private $profileManager;
/** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
private $userManager;
/** @var IURLGenerator */
@@ -61,18 +61,18 @@ class ContactsStoreTest extends TestCase {
protected function setUp(): void {
parent::setUp();
- $this->accountManager = $this->createMock(IAccountManager::class);
$this->contactsManager = $this->createMock(IManager::class);
$this->userManager = $this->createMock(IUserManager::class);
+ $this->profileManager = $this->createMock(ProfileManager::class);
$this->urlGenerator = $this->createMock(IURLGenerator::class);
$this->groupManager = $this->createMock(IGroupManager::class);
$this->config = $this->createMock(IConfig::class);
$this->knownUserService = $this->createMock(KnownUserService::class);
$this->l10nFactory = $this->createMock(IL10NFactory::class);
$this->contactsStore = new ContactsStore(
- $this->accountManager,
$this->contactsManager,
$this->config,
+ $this->profileManager,
$this->userManager,
$this->urlGenerator,
$this->groupManager,