diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2020-01-29 10:42:11 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2020-01-29 20:37:47 +0100 |
commit | 391a368557b18a89c79406d366e578530e36fe36 (patch) | |
tree | dbfdb1fa9c74838a7f91e47079c2160a948bd8ca /apps/settings/tests | |
parent | 53817f5fc20533d2b9da2ecff6bd96acf21b4e17 (diff) | |
download | nextcloud-server-391a368557b18a89c79406d366e578530e36fe36.tar.gz nextcloud-server-391a368557b18a89c79406d366e578530e36fe36.zip |
Move the personal 2FA settings to its own app
Small isolated classes are easier to understand and to maintain!
Another step in the cleaning up of the settings. So that adding new
stuff later is easier.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/settings/tests')
-rw-r--r-- | apps/settings/tests/Settings/Personal/SecurityTest.php | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/apps/settings/tests/Settings/Personal/SecurityTest.php b/apps/settings/tests/Settings/Personal/SecurityTest.php index bd087afa466..103bd9dae92 100644 --- a/apps/settings/tests/Settings/Personal/SecurityTest.php +++ b/apps/settings/tests/Settings/Personal/SecurityTest.php @@ -43,15 +43,6 @@ class SecurityTest extends TestCase { /** @var IUserManager|MockObject */ private $userManager; - /** @var ProviderLoader|MockObject */ - private $providerLoader; - - /** @var IUserSession|MockObject */ - private $userSession; - - /** @var IConfig|MockObject */ - private $config; - /** @var string */ private $uid; @@ -62,16 +53,10 @@ class SecurityTest extends TestCase { parent::setUp(); $this->userManager = $this->createMock(IUserManager::class); - $this->providerLoader = $this->createMock(ProviderLoader::class); - $this->userSession = $this->createMock(IUserSession::class); - $this->config = $this->createMock(IConfig::class); $this->uid = 'test123'; $this->section = new Security( $this->userManager, - $this->providerLoader, - $this->userSession, - $this->config, $this->uid ); } @@ -85,31 +70,11 @@ class SecurityTest extends TestCase { $user->expects($this->once()) ->method('canChangePassword') ->willReturn(true); - $this->userSession->expects($this->once()) - ->method('getUser') - ->willReturn($user); - $this->providerLoader->expects($this->once()) - ->method('getProviders') - ->with($user) - ->willReturn([]); - $this->config->expects($this->once()) - ->method('getUserValue') - ->with( - $this->uid, - 'accessibility', - 'theme', - false - ) - ->willReturn(false); $form = $this->section->getForm(); $expected = new TemplateResponse('settings', 'settings/personal/security', [ 'passwordChangeSupported' => true, - 'twoFactorProviderData' => [ - 'providers' => [], - ], - 'themedark' => false, ]); $this->assertEquals($expected, $form); } |