diff options
Diffstat (limited to 'apps/settings/tests/Controller/UsersControllerTest.php')
-rw-r--r-- | apps/settings/tests/Controller/UsersControllerTest.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/apps/settings/tests/Controller/UsersControllerTest.php b/apps/settings/tests/Controller/UsersControllerTest.php index 65258252016..9029b1af396 100644 --- a/apps/settings/tests/Controller/UsersControllerTest.php +++ b/apps/settings/tests/Controller/UsersControllerTest.php @@ -113,8 +113,9 @@ class UsersControllerTest extends \Test\TestCase { $this->encryptionModule = $this->createMock(IEncryptionModule::class); $this->encryptionManager->expects($this->any())->method('getEncryptionModules') - ->willReturn(['encryptionModule' => ['callback' => function () { return $this->encryptionModule;}]]); - + ->willReturn(['encryptionModule' => ['callback' => function () { + return $this->encryptionModule; + }]]); } /** @@ -444,12 +445,11 @@ class UsersControllerTest extends \Test\TestCase { * @dataProvider dataTestGetVerificationCode */ public function testGetVerificationCode($account, $type, $dataBefore, $expectedData, $onlyVerificationCode) { - $message = 'Use my Federated Cloud ID to share with me: user@nextcloud.com'; $signature = 'theSignature'; $code = $message . ' ' . $signature; - if($type === AccountManager::PROPERTY_TWITTER) { + if ($type === AccountManager::PROPERTY_TWITTER) { $code = $message . ' ' . md5($signature); } @@ -485,7 +485,6 @@ class UsersControllerTest extends \Test\TestCase { } public function dataTestGetVerificationCode() { - $accountDataBefore = [ AccountManager::PROPERTY_WEBSITE => ['value' => 'https://nextcloud.com', 'verified' => AccountManager::NOT_VERIFIED], AccountManager::PROPERTY_TWITTER => ['value' => '@nextclouders', 'verified' => AccountManager::NOT_VERIFIED, 'signature' => 'theSignature'], @@ -513,7 +512,6 @@ class UsersControllerTest extends \Test\TestCase { * test get verification code in case no valid user was given */ public function testGetVerificationCodeInvalidUser() { - $controller = $this->getController(); $this->userSession->expects($this->once())->method('getUser')->willReturn(null); $result = $controller->getVerificationCode('account', false); @@ -541,8 +539,11 @@ class UsersControllerTest extends \Test\TestCase { $this->encryptionManager->expects($this->any()) ->method('getEncryptionModule') ->willReturnCallback(function () use ($encryptionModuleLoaded) { - if ($encryptionModuleLoaded) return $this->encryptionModule; - else throw new ModuleDoesNotExistsException(); + if ($encryptionModuleLoaded) { + return $this->encryptionModule; + } else { + throw new ModuleDoesNotExistsException(); + } }); $this->encryptionModule->expects($this->any()) ->method('needDetailedAccessList') @@ -565,5 +566,4 @@ class UsersControllerTest extends \Test\TestCase { [false, false, false, true], ]; } - } |