diff options
Diffstat (limited to 'apps/settings/tests/Controller')
6 files changed, 10 insertions, 15 deletions
diff --git a/apps/settings/tests/Controller/AuthSettingsControllerTest.php b/apps/settings/tests/Controller/AuthSettingsControllerTest.php index 1d24a90794f..b642b1c06c5 100644 --- a/apps/settings/tests/Controller/AuthSettingsControllerTest.php +++ b/apps/settings/tests/Controller/AuthSettingsControllerTest.php @@ -479,5 +479,4 @@ class AuthSettingsControllerTest extends TestCase { $expected = new JSONResponse([]); $this->assertEquals($expected, $response); } - } diff --git a/apps/settings/tests/Controller/CertificateControllerTest.php b/apps/settings/tests/Controller/CertificateControllerTest.php index a04906a6811..0259868321d 100644 --- a/apps/settings/tests/Controller/CertificateControllerTest.php +++ b/apps/settings/tests/Controller/CertificateControllerTest.php @@ -193,5 +193,4 @@ class CertificateControllerTest extends \Test\TestCase { $this->assertEquals(new DataResponse(), $this->certificateController->removePersonalRootCertificate('CertificateToRemove')); } - } diff --git a/apps/settings/tests/Controller/CheckSetupControllerTest.php b/apps/settings/tests/Controller/CheckSetupControllerTest.php index 86acf8acced..ebbe9fd95b7 100644 --- a/apps/settings/tests/Controller/CheckSetupControllerTest.php +++ b/apps/settings/tests/Controller/CheckSetupControllerTest.php @@ -719,7 +719,7 @@ class CheckSetupControllerTest extends TestCase { ->expects($this->once()) ->method('getCurlVersion') ->willReturn(['ssl_version' => 'OpenSSL/1.0.1d']); - $this->assertSame('', $this->invokePrivate($this->checkSetupController, 'isUsedTlsLibOutdated')); + $this->assertSame('', $this->invokePrivate($this->checkSetupController, 'isUsedTlsLibOutdated')); } public function testIsUsedTlsLibOutdatedWithMatchingOpenSslVersion1() { diff --git a/apps/settings/tests/Controller/MailSettingsControllerTest.php b/apps/settings/tests/Controller/MailSettingsControllerTest.php index 7d17ac80407..7611d6bcf68 100644 --- a/apps/settings/tests/Controller/MailSettingsControllerTest.php +++ b/apps/settings/tests/Controller/MailSettingsControllerTest.php @@ -133,7 +133,6 @@ class MailSettingsControllerTest extends \Test\TestCase { null ); $this->assertSame(Http::STATUS_OK, $response->getStatus()); - } public function testStoreCredentials() { @@ -189,5 +188,4 @@ class MailSettingsControllerTest extends \Test\TestCase { $response = $this->mailController->sendTestMail(); $this->assertSame(Http::STATUS_OK, $response->getStatus()); } - } diff --git a/apps/settings/tests/Controller/TwoFactorSettingsControllerTest.php b/apps/settings/tests/Controller/TwoFactorSettingsControllerTest.php index d7da886c991..1d7c7db8924 100644 --- a/apps/settings/tests/Controller/TwoFactorSettingsControllerTest.php +++ b/apps/settings/tests/Controller/TwoFactorSettingsControllerTest.php @@ -82,5 +82,4 @@ class TwoFactorSettingsControllerTest extends TestCase { $this->assertEquals($expected, $resp); } - } 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], ]; } - } |