diff options
author | skjnldsv <skjnldsv@protonmail.com> | 2024-11-13 09:42:26 +0100 |
---|---|---|
committer | skjnldsv <skjnldsv@protonmail.com> | 2024-11-14 10:25:02 +0100 |
commit | b15fdfd40e4bf96b53f7afcf0e4dce359158cf1c (patch) | |
tree | 0c5cfe660bcdb04338661687b3733ae3cbc88ced /tests/Core | |
parent | dfa7e7edea66c37a7b33965ad9e93648d44243b0 (diff) | |
download | nextcloud-server-b15fdfd40e4bf96b53f7afcf0e4dce359158cf1c.tar.gz nextcloud-server-b15fdfd40e4bf96b53f7afcf0e4dce359158cf1c.zip |
chore(profile): move profile app from core to apps
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Diffstat (limited to 'tests/Core')
-rw-r--r-- | tests/Core/Controller/ProfilePageControllerTest.php | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/tests/Core/Controller/ProfilePageControllerTest.php b/tests/Core/Controller/ProfilePageControllerTest.php deleted file mode 100644 index 361f93ff409..00000000000 --- a/tests/Core/Controller/ProfilePageControllerTest.php +++ /dev/null @@ -1,78 +0,0 @@ -<?php - -declare(strict_types=1); - -/** - * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors - * SPDX-License-Identifier: AGPL-3.0-or-later - */ - -namespace Core\Controller; - -use OC\Core\Controller\ProfilePageController; -use OC\Profile\ProfileManager; -use OC\UserStatus\Manager; -use OCP\AppFramework\Services\IInitialState; -use OCP\EventDispatcher\IEventDispatcher; -use OCP\INavigationManager; -use OCP\IRequest; -use OCP\IUser; -use OCP\IUserManager; -use OCP\IUserSession; -use OCP\Share\IManager; -use Test\TestCase; - -class ProfilePageControllerTest extends TestCase { - - private IUserManager $userManager; - private ProfilePageController $controller; - - protected function setUp(): void { - parent::setUp(); - - $request = $this->createMock(IRequest::class); - $initialStateService = $this->createMock(IInitialState::class); - $profileManager = $this->createMock(ProfileManager::class); - $shareManager = $this->createMock(IManager::class); - $this->userManager = $this->createMock(IUserManager::class); - $userSession = $this->createMock(IUserSession::class); - $userStatusManager = $this->createMock(Manager::class); - $navigationManager = $this->createMock(INavigationManager::class); - $eventDispatcher = $this->createMock(IEventDispatcher::class); - - $this->controller = new ProfilePageController( - 'core', - $request, - $initialStateService, - $profileManager, - $shareManager, - $this->userManager, - $userSession, - $userStatusManager, - $navigationManager, - $eventDispatcher, - ); - } - - public function testUserNotFound(): void { - $this->userManager->method('get') - ->willReturn(null); - - $response = $this->controller->index('bob'); - - $this->assertTrue($response->isThrottled()); - } - - public function testUserDisabled(): void { - $user = $this->createMock(IUser::class); - $user->method('isEnabled') - ->willReturn(false); - - $this->userManager->method('get') - ->willReturn($user); - - $response = $this->controller->index('bob'); - - $this->assertFalse($response->isThrottled()); - } -} |