diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-04-10 14:19:56 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-04-10 14:19:56 +0200 |
commit | caff1023ea72bb2ea94130e18a2a6e2ccf819e5f (patch) | |
tree | 186d494c2aea5dea7255d3584ef5d595fc6e6194 /tests/lib/Authentication | |
parent | edf8ce32cffdb920e8171207b342abbd7f1fbe73 (diff) | |
download | nextcloud-server-caff1023ea72bb2ea94130e18a2a6e2ccf819e5f.tar.gz nextcloud-server-caff1023ea72bb2ea94130e18a2a6e2ccf819e5f.zip |
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.
This also removes and empty lines from method/function bodies at the
beginning and end.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests/lib/Authentication')
33 files changed, 0 insertions, 36 deletions
diff --git a/tests/lib/Authentication/Events/RemoteWipeFinishedTest.php b/tests/lib/Authentication/Events/RemoteWipeFinishedTest.php index 4d64a1c216a..f28f0ef78bb 100644 --- a/tests/lib/Authentication/Events/RemoteWipeFinishedTest.php +++ b/tests/lib/Authentication/Events/RemoteWipeFinishedTest.php @@ -30,12 +30,10 @@ use OC\Authentication\Token\IToken; use Test\TestCase; class RemoteWipeFinishedTest extends TestCase { - public function testGetToken() { $token = $this->createMock(IToken::class); $event = new RemoteWipeFinished($token); $this->assertSame($token, $event->getToken()); } - } diff --git a/tests/lib/Authentication/Events/RemoteWipeStartedTest.php b/tests/lib/Authentication/Events/RemoteWipeStartedTest.php index 0a962eafc12..d6b0ef7019e 100644 --- a/tests/lib/Authentication/Events/RemoteWipeStartedTest.php +++ b/tests/lib/Authentication/Events/RemoteWipeStartedTest.php @@ -30,12 +30,10 @@ use OC\Authentication\Token\IToken; use Test\TestCase; class RemoteWipeStartedTest extends TestCase { - public function testGetToken() { $token = $this->createMock(IToken::class); $event = new RemoteWipeStarted($token); $this->assertSame($token, $event->getToken()); } - } diff --git a/tests/lib/Authentication/Listeners/RemoteWipeActivityListenerTest.php b/tests/lib/Authentication/Listeners/RemoteWipeActivityListenerTest.php index 35d0ae26080..05d38380026 100644 --- a/tests/lib/Authentication/Listeners/RemoteWipeActivityListenerTest.php +++ b/tests/lib/Authentication/Listeners/RemoteWipeActivityListenerTest.php @@ -151,5 +151,4 @@ class RemoteWipeActivityListenerTests extends TestCase { $this->listener->handle($event); } - } diff --git a/tests/lib/Authentication/Listeners/RemoteWipeEmailListenerTest.php b/tests/lib/Authentication/Listeners/RemoteWipeEmailListenerTest.php index 2470e686902..9d2319fb9cc 100644 --- a/tests/lib/Authentication/Listeners/RemoteWipeEmailListenerTest.php +++ b/tests/lib/Authentication/Listeners/RemoteWipeEmailListenerTest.php @@ -239,5 +239,4 @@ class RemoteWipeEmailListenerTest extends TestCase { $this->listener->handle($event); } - } diff --git a/tests/lib/Authentication/Listeners/RemoteWipeNotificationsListenerTest.php b/tests/lib/Authentication/Listeners/RemoteWipeNotificationsListenerTest.php index b582749e645..1e03a344404 100644 --- a/tests/lib/Authentication/Listeners/RemoteWipeNotificationsListenerTest.php +++ b/tests/lib/Authentication/Listeners/RemoteWipeNotificationsListenerTest.php @@ -148,5 +148,4 @@ class RemoteWipeNotificationListenerTests extends TestCase { $this->listener->handle($event); } - } diff --git a/tests/lib/Authentication/Login/ALoginCommandTest.php b/tests/lib/Authentication/Login/ALoginCommandTest.php index f09b649ffcb..03cc7dfadc7 100644 --- a/tests/lib/Authentication/Login/ALoginCommandTest.php +++ b/tests/lib/Authentication/Login/ALoginCommandTest.php @@ -118,5 +118,4 @@ abstract class ALoginCommandTest extends TestCase { $data->setUser($this->user); return $data; } - } diff --git a/tests/lib/Authentication/Login/ClearLostPasswordTokensCommandTest.php b/tests/lib/Authentication/Login/ClearLostPasswordTokensCommandTest.php index 9c14c2a3fb2..49c81b4f385 100644 --- a/tests/lib/Authentication/Login/ClearLostPasswordTokensCommandTest.php +++ b/tests/lib/Authentication/Login/ClearLostPasswordTokensCommandTest.php @@ -62,5 +62,4 @@ class ClearLostPasswordTokensCommandTest extends ALoginCommandTest { $this->assertTrue($result->isSuccess()); } - } diff --git a/tests/lib/Authentication/Login/CompleteLoginCommandTest.php b/tests/lib/Authentication/Login/CompleteLoginCommandTest.php index e611611dd7c..7d6152f97a1 100644 --- a/tests/lib/Authentication/Login/CompleteLoginCommandTest.php +++ b/tests/lib/Authentication/Login/CompleteLoginCommandTest.php @@ -62,6 +62,4 @@ class CompleteLoginCommandTest extends ALoginCommandTest { $this->assertTrue($result->isSuccess()); } - - } diff --git a/tests/lib/Authentication/Login/CreateSessionTokenCommandTest.php b/tests/lib/Authentication/Login/CreateSessionTokenCommandTest.php index 82ae90015a4..9e49413e344 100644 --- a/tests/lib/Authentication/Login/CreateSessionTokenCommandTest.php +++ b/tests/lib/Authentication/Login/CreateSessionTokenCommandTest.php @@ -117,5 +117,4 @@ class CreateSessionTokenCommandTest extends ALoginCommandTest { $this->assertTrue($result->isSuccess()); $this->assertFalse($data->isRememberLogin()); } - } diff --git a/tests/lib/Authentication/Login/EmailLoginCommandTest.php b/tests/lib/Authentication/Login/EmailLoginCommandTest.php index 5217a4d0080..4c1f0bd0e5b 100644 --- a/tests/lib/Authentication/Login/EmailLoginCommandTest.php +++ b/tests/lib/Authentication/Login/EmailLoginCommandTest.php @@ -161,5 +161,4 @@ class EmailLoginCommandTest extends ALoginCommandTest { $this->assertEquals($emailUser, $data->getUser()); $this->assertEquals('user2', $data->getUsername()); } - } diff --git a/tests/lib/Authentication/Login/FinishRememberedLoginCommandTest.php b/tests/lib/Authentication/Login/FinishRememberedLoginCommandTest.php index 9cb3734922e..98df129771a 100644 --- a/tests/lib/Authentication/Login/FinishRememberedLoginCommandTest.php +++ b/tests/lib/Authentication/Login/FinishRememberedLoginCommandTest.php @@ -65,5 +65,4 @@ class FinishRememberedLoginCommandTest extends ALoginCommandTest { $this->assertTrue($result->isSuccess()); } - } diff --git a/tests/lib/Authentication/Login/LoggedInCheckCommandTest.php b/tests/lib/Authentication/Login/LoggedInCheckCommandTest.php index 7b47bbf5130..18f4a4938e8 100644 --- a/tests/lib/Authentication/Login/LoggedInCheckCommandTest.php +++ b/tests/lib/Authentication/Login/LoggedInCheckCommandTest.php @@ -69,5 +69,4 @@ class LoggedInCheckCommandTest extends ALoginCommandTest { $this->assertFalse($result->isSuccess()); $this->assertSame(LoginController::LOGIN_MSG_INVALIDPASSWORD, $result->getErrorMessage()); } - } diff --git a/tests/lib/Authentication/Login/PreLoginHookCommandTest.php b/tests/lib/Authentication/Login/PreLoginHookCommandTest.php index c067899ffc2..66822291ba8 100644 --- a/tests/lib/Authentication/Login/PreLoginHookCommandTest.php +++ b/tests/lib/Authentication/Login/PreLoginHookCommandTest.php @@ -62,5 +62,4 @@ class PreLoginHookCommandTest extends ALoginCommandTest { $this->assertTrue($result->isSuccess()); } - } diff --git a/tests/lib/Authentication/Login/SetUserTimezoneCommandTest.php b/tests/lib/Authentication/Login/SetUserTimezoneCommandTest.php index 14da73b93fa..88514fec237 100644 --- a/tests/lib/Authentication/Login/SetUserTimezoneCommandTest.php +++ b/tests/lib/Authentication/Login/SetUserTimezoneCommandTest.php @@ -86,5 +86,4 @@ class SetUserTimezoneCommandTest extends ALoginCommandTest { $this->assertTrue($result->isSuccess()); } - } diff --git a/tests/lib/Authentication/Login/TwoFactorCommandTest.php b/tests/lib/Authentication/Login/TwoFactorCommandTest.php index 3e8ad142cc1..4796aecad2e 100644 --- a/tests/lib/Authentication/Login/TwoFactorCommandTest.php +++ b/tests/lib/Authentication/Login/TwoFactorCommandTest.php @@ -355,5 +355,4 @@ class TwoFactorCommandTest extends ALoginCommandTest { $this->assertTrue($result->isSuccess()); $this->assertEquals('two/factor/url', $result->getRedirectUrl()); } - } diff --git a/tests/lib/Authentication/Login/UidLoginCommandTest.php b/tests/lib/Authentication/Login/UidLoginCommandTest.php index 1d477921677..6e22609631d 100644 --- a/tests/lib/Authentication/Login/UidLoginCommandTest.php +++ b/tests/lib/Authentication/Login/UidLoginCommandTest.php @@ -75,5 +75,4 @@ class UidLoginCommandTest extends ALoginCommandTest { $this->assertTrue($result->isSuccess()); $this->assertEquals($this->user, $data->getUser()); } - } diff --git a/tests/lib/Authentication/Login/UpdateLastPasswordConfirmCommandTest.php b/tests/lib/Authentication/Login/UpdateLastPasswordConfirmCommandTest.php index b66ecdde3c4..3db23d471ec 100644 --- a/tests/lib/Authentication/Login/UpdateLastPasswordConfirmCommandTest.php +++ b/tests/lib/Authentication/Login/UpdateLastPasswordConfirmCommandTest.php @@ -60,5 +60,4 @@ class UpdateLastPasswordConfirmCommandTest extends ALoginCommandTest { $this->assertTrue($result->isSuccess()); } - } diff --git a/tests/lib/Authentication/Login/UserDisabledCheckCommandTest.php b/tests/lib/Authentication/Login/UserDisabledCheckCommandTest.php index 2a2f23162bf..e6f619aac0f 100644 --- a/tests/lib/Authentication/Login/UserDisabledCheckCommandTest.php +++ b/tests/lib/Authentication/Login/UserDisabledCheckCommandTest.php @@ -93,5 +93,4 @@ class UserDisabledCheckCommandTest extends ALoginCommandTest { $this->assertTrue($result->isSuccess()); } - } diff --git a/tests/lib/Authentication/LoginCredentials/CredentialsTest.php b/tests/lib/Authentication/LoginCredentials/CredentialsTest.php index 263db1bbb5b..d3dcd9f4d6b 100644 --- a/tests/lib/Authentication/LoginCredentials/CredentialsTest.php +++ b/tests/lib/Authentication/LoginCredentials/CredentialsTest.php @@ -62,5 +62,4 @@ class CredentialsTest extends TestCase { public function testGetPassword() { $this->assertEquals($this->password, $this->credentials->getPassword()); } - } diff --git a/tests/lib/Authentication/LoginCredentials/StoreTest.php b/tests/lib/Authentication/LoginCredentials/StoreTest.php index b75e1498889..e7b9cb5996f 100644 --- a/tests/lib/Authentication/LoginCredentials/StoreTest.php +++ b/tests/lib/Authentication/LoginCredentials/StoreTest.php @@ -179,5 +179,4 @@ class StoreTest extends TestCase { $this->store->getLoginCredentials(); } - } diff --git a/tests/lib/Authentication/Token/DefaultTokenCleanupJobTest.php b/tests/lib/Authentication/Token/DefaultTokenCleanupJobTest.php index e4bc13fe5fb..0991c8b1fc8 100644 --- a/tests/lib/Authentication/Token/DefaultTokenCleanupJobTest.php +++ b/tests/lib/Authentication/Token/DefaultTokenCleanupJobTest.php @@ -49,5 +49,4 @@ class DefaultTokenCleanupJobTest extends TestCase { ->with(); $this->invokePrivate($this->job, 'run', [null]); } - } diff --git a/tests/lib/Authentication/Token/DefaultTokenMapperTest.php b/tests/lib/Authentication/Token/DefaultTokenMapperTest.php index 7060dc2a770..855e90ab6b9 100644 --- a/tests/lib/Authentication/Token/DefaultTokenMapperTest.php +++ b/tests/lib/Authentication/Token/DefaultTokenMapperTest.php @@ -230,5 +230,4 @@ class DefaultTokenMapperTest extends TestCase { $this->mapper->deleteByName($name); $this->assertEquals(2, $this->getNumberOfTokens()); } - } diff --git a/tests/lib/Authentication/Token/DefaultTokenProviderTest.php b/tests/lib/Authentication/Token/DefaultTokenProviderTest.php index a1287680317..d95e4c0418d 100644 --- a/tests/lib/Authentication/Token/DefaultTokenProviderTest.php +++ b/tests/lib/Authentication/Token/DefaultTokenProviderTest.php @@ -449,7 +449,6 @@ class DefaultTokenProviderTest extends TestCase { } catch (ExpiredTokenException $e) { $this->assertSame($token, $e->getToken()); } - } public function testGetTokenById() { diff --git a/tests/lib/Authentication/Token/PublicKeyTokenMapperTest.php b/tests/lib/Authentication/Token/PublicKeyTokenMapperTest.php index fc1c71e4511..5ba7fe7c40e 100644 --- a/tests/lib/Authentication/Token/PublicKeyTokenMapperTest.php +++ b/tests/lib/Authentication/Token/PublicKeyTokenMapperTest.php @@ -266,5 +266,4 @@ class PublicKeyTokenMapperTest extends TestCase { $this->assertFalse($this->mapper->hasExpiredTokens('user1')); $this->assertTrue($this->mapper->hasExpiredTokens('user3')); } - } diff --git a/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php b/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php index 357200e24b4..43ae0e9542c 100644 --- a/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php +++ b/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php @@ -389,7 +389,6 @@ class PublicKeyTokenProviderTest extends TestCase { } catch (ExpiredTokenException $e) { $this->assertSame($actual, $e->getToken()); } - } public function testGetTokenById() { diff --git a/tests/lib/Authentication/Token/RemoteWipeTest.php b/tests/lib/Authentication/Token/RemoteWipeTest.php index 11be7590459..1338931ac72 100644 --- a/tests/lib/Authentication/Token/RemoteWipeTest.php +++ b/tests/lib/Authentication/Token/RemoteWipeTest.php @@ -187,5 +187,4 @@ class RemoteWipeTest extends TestCase { $this->assertTrue($result); } - } diff --git a/tests/lib/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDaoTest.php b/tests/lib/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDaoTest.php index 50a74a6424e..1a21ee047df 100644 --- a/tests/lib/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDaoTest.php +++ b/tests/lib/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDaoTest.php @@ -159,5 +159,4 @@ class ProviderUserAssignmentDaoTest extends TestCase { $this->assertCount(1, $statesUser1); $this->assertCount(0, $statesUser2); } - } diff --git a/tests/lib/Authentication/TwoFactorAuth/EnforcementStateTest.php b/tests/lib/Authentication/TwoFactorAuth/EnforcementStateTest.php index 0508c84787c..f8c4be09a6f 100644 --- a/tests/lib/Authentication/TwoFactorAuth/EnforcementStateTest.php +++ b/tests/lib/Authentication/TwoFactorAuth/EnforcementStateTest.php @@ -33,7 +33,6 @@ use OC\Authentication\TwoFactorAuth\EnforcementState; use Test\TestCase; class EnforcementStateTest extends TestCase { - public function testIsEnforced() { $state = new EnforcementState(true); diff --git a/tests/lib/Authentication/TwoFactorAuth/MandatoryTwoFactorTest.php b/tests/lib/Authentication/TwoFactorAuth/MandatoryTwoFactorTest.php index e1e401e7683..5147d763daf 100644 --- a/tests/lib/Authentication/TwoFactorAuth/MandatoryTwoFactorTest.php +++ b/tests/lib/Authentication/TwoFactorAuth/MandatoryTwoFactorTest.php @@ -194,5 +194,4 @@ class MandatoryTwoFactorTest extends TestCase { $this->mandatoryTwoFactor->setState(new EnforcementState(false)); } - } diff --git a/tests/lib/Authentication/TwoFactorAuth/ProviderLoaderTest.php b/tests/lib/Authentication/TwoFactorAuth/ProviderLoaderTest.php index 20f7a57d367..b77bddcd5a4 100644 --- a/tests/lib/Authentication/TwoFactorAuth/ProviderLoaderTest.php +++ b/tests/lib/Authentication/TwoFactorAuth/ProviderLoaderTest.php @@ -98,5 +98,4 @@ class ProviderLoaderTest extends TestCase { $this->assertArrayHasKey('test', $providers); $this->assertSame($provider, $providers['test']); } - } diff --git a/tests/lib/Authentication/TwoFactorAuth/ProviderManagerTest.php b/tests/lib/Authentication/TwoFactorAuth/ProviderManagerTest.php index e34d844c3a4..0c85d0cf1ba 100644 --- a/tests/lib/Authentication/TwoFactorAuth/ProviderManagerTest.php +++ b/tests/lib/Authentication/TwoFactorAuth/ProviderManagerTest.php @@ -150,5 +150,4 @@ class ProviderManagerTest extends TestCase { $this->assertTrue($res); } - } diff --git a/tests/lib/Authentication/TwoFactorAuth/ProviderSetTest.php b/tests/lib/Authentication/TwoFactorAuth/ProviderSetTest.php index c5d2b356a2c..ef221851894 100644 --- a/tests/lib/Authentication/TwoFactorAuth/ProviderSetTest.php +++ b/tests/lib/Authentication/TwoFactorAuth/ProviderSetTest.php @@ -90,5 +90,4 @@ class ProviderSetTest extends TestCase { $this->assertTrue($set->isProviderMissing()); } - } diff --git a/tests/lib/Authentication/TwoFactorAuth/RegistryTest.php b/tests/lib/Authentication/TwoFactorAuth/RegistryTest.php index 5b2aa654f11..49f4eaa7020 100644 --- a/tests/lib/Authentication/TwoFactorAuth/RegistryTest.php +++ b/tests/lib/Authentication/TwoFactorAuth/RegistryTest.php @@ -127,5 +127,4 @@ class RegistryTest extends TestCase { $this->registry->cleanUp('twofactor_u2f'); } - } |