summaryrefslogtreecommitdiffstats
path: root/tests/Core
diff options
context:
space:
mode:
authorChristoph Wurst <ChristophWurst@users.noreply.github.com>2020-04-09 15:53:09 +0200
committerGitHub <noreply@github.com>2020-04-09 15:53:09 +0200
commitc56a273b39186c509c57ef6bec221d3c4e3d81d3 (patch)
treeb2e4095e763874699646c2c90e41785c99b6f247 /tests/Core
parentf0dd71ccd266ede38114d25be035abb3f2661fc8 (diff)
parentafbd9c4e6ed834e713039f2cff88ba3eec03dadb (diff)
downloadnextcloud-server-c56a273b39186c509c57ef6bec221d3c4e3d81d3.tar.gz
nextcloud-server-c56a273b39186c509c57ef6bec221d3c4e3d81d3.zip
Merge pull request #20383 from nextcloud/techdebt/function-spacing
Unify function spacing to PSR2 recommendation
Diffstat (limited to 'tests/Core')
-rw-r--r--tests/Core/Command/Config/App/GetConfigTest.php2
-rw-r--r--tests/Core/Command/Config/ListConfigsTest.php2
-rw-r--r--tests/Core/Command/Config/System/GetConfigTest.php2
-rw-r--r--tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php2
-rw-r--r--tests/Core/Command/Encryption/DecryptAllTest.php2
-rw-r--r--tests/Core/Command/Group/AddTest.php2
-rw-r--r--tests/Core/Command/Group/AddUserTest.php2
-rw-r--r--tests/Core/Command/Group/DeleteTest.php8
-rw-r--r--tests/Core/Command/Group/ListCommandTest.php2
-rw-r--r--tests/Core/Command/Group/RemoveUserTest.php2
-rw-r--r--tests/Core/Controller/ClientFlowLoginControllerTest.php2
-rw-r--r--tests/Core/Controller/ClientFlowLoginV2ControllerTest.php12
-rw-r--r--tests/Core/Controller/CssControllerTest.php2
-rw-r--r--tests/Core/Controller/JsControllerTest.php2
-rw-r--r--tests/Core/Controller/LoginControllerTest.php2
-rw-r--r--tests/Core/Controller/LostControllerTest.php6
16 files changed, 26 insertions, 26 deletions
diff --git a/tests/Core/Command/Config/App/GetConfigTest.php b/tests/Core/Command/Config/App/GetConfigTest.php
index b18bc8de1d0..75e51a68b2f 100644
--- a/tests/Core/Command/Config/App/GetConfigTest.php
+++ b/tests/Core/Command/Config/App/GetConfigTest.php
@@ -147,7 +147,7 @@ class GetConfigTest extends TestCase {
$output = '';
$this->consoleOutput->expects($this->any())
->method('writeln')
- ->willReturnCallback(function($value) {
+ ->willReturnCallback(function ($value) {
global $output;
$output .= $value . "\n";
return $output;
diff --git a/tests/Core/Command/Config/ListConfigsTest.php b/tests/Core/Command/Config/ListConfigsTest.php
index ac0155f9b5f..2cab9500702 100644
--- a/tests/Core/Command/Config/ListConfigsTest.php
+++ b/tests/Core/Command/Config/ListConfigsTest.php
@@ -320,7 +320,7 @@ class ListConfigsTest extends TestCase {
$output = '';
$this->consoleOutput->expects($this->any())
->method('writeln')
- ->willReturnCallback(function($value) {
+ ->willReturnCallback(function ($value) {
global $output;
$output .= $value . "\n";
return $output;
diff --git a/tests/Core/Command/Config/System/GetConfigTest.php b/tests/Core/Command/Config/System/GetConfigTest.php
index ab366b3e1f5..175a24eb354 100644
--- a/tests/Core/Command/Config/System/GetConfigTest.php
+++ b/tests/Core/Command/Config/System/GetConfigTest.php
@@ -156,7 +156,7 @@ class GetConfigTest extends TestCase {
$output = '';
$this->consoleOutput->expects($this->any())
->method('writeln')
- ->willReturnCallback(function($value) {
+ ->willReturnCallback(function ($value) {
global $output;
$output .= $value . "\n";
return $output;
diff --git a/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php b/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php
index 4f15b2a50b1..4f3fc432dfe 100644
--- a/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php
+++ b/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php
@@ -332,7 +332,7 @@ class ChangeKeyStorageRootTest extends TestCase {
public function testPrepareParentFolder($path, $pathExists) {
$this->view->expects($this->any())->method('file_exists')
->willReturnCallback(
- function($fileExistsPath) use ($path, $pathExists) {
+ function ($fileExistsPath) use ($path, $pathExists) {
if ($path === $fileExistsPath) {
return $pathExists;
}
diff --git a/tests/Core/Command/Encryption/DecryptAllTest.php b/tests/Core/Command/Encryption/DecryptAllTest.php
index 4cae5bc0ad2..a6918404d71 100644
--- a/tests/Core/Command/Encryption/DecryptAllTest.php
+++ b/tests/Core/Command/Encryption/DecryptAllTest.php
@@ -217,7 +217,7 @@ class DecryptAllTest extends TestCase {
$this->decryptAll->expects($this->once())
->method('decryptAll')
->with($this->consoleInput, $this->consoleOutput, 'user1')
- ->willReturnCallback(function() { throw new \Exception(); });
+ ->willReturnCallback(function () { throw new \Exception(); });
$this->invokePrivate($instance, 'execute', [$this->consoleInput, $this->consoleOutput]);
}
diff --git a/tests/Core/Command/Group/AddTest.php b/tests/Core/Command/Group/AddTest.php
index d4ba34246af..87cf3c6b8d1 100644
--- a/tests/Core/Command/Group/AddTest.php
+++ b/tests/Core/Command/Group/AddTest.php
@@ -52,7 +52,7 @@ class AddTest extends TestCase {
$this->input = $this->createMock(InputInterface::class);
$this->input->method('getArgument')
- ->willReturnCallback(function($arg) {
+ ->willReturnCallback(function ($arg) {
if ($arg === 'groupid') {
return 'myGroup';
}
diff --git a/tests/Core/Command/Group/AddUserTest.php b/tests/Core/Command/Group/AddUserTest.php
index 1ee2d2d3377..800e5ecd4f4 100644
--- a/tests/Core/Command/Group/AddUserTest.php
+++ b/tests/Core/Command/Group/AddUserTest.php
@@ -58,7 +58,7 @@ class AddUserTest extends TestCase {
$this->input = $this->createMock(InputInterface::class);
$this->input->method('getArgument')
- ->willReturnCallback(function($arg) {
+ ->willReturnCallback(function ($arg) {
if ($arg === 'group') {
return 'myGroup';
} else if ($arg === 'user') {
diff --git a/tests/Core/Command/Group/DeleteTest.php b/tests/Core/Command/Group/DeleteTest.php
index 69bdae99d63..60d41d2e24c 100644
--- a/tests/Core/Command/Group/DeleteTest.php
+++ b/tests/Core/Command/Group/DeleteTest.php
@@ -57,7 +57,7 @@ class DeleteTest extends TestCase {
public function testDoesNotExists() {
$gid = 'myGroup';
$this->input->method('getArgument')
- ->willReturnCallback(function($arg) use ($gid) {
+ ->willReturnCallback(function ($arg) use ($gid) {
if ($arg === 'groupid') {
return $gid;
}
@@ -79,7 +79,7 @@ class DeleteTest extends TestCase {
public function testDeleteAdmin() {
$gid = 'admin';
$this->input->method('getArgument')
- ->willReturnCallback(function($arg) use ($gid) {
+ ->willReturnCallback(function ($arg) use ($gid) {
if ($arg === 'groupid') {
return $gid;
}
@@ -98,7 +98,7 @@ class DeleteTest extends TestCase {
public function testDeleteFailed() {
$gid = 'myGroup';
$this->input->method('getArgument')
- ->willReturnCallback(function($arg) use ($gid) {
+ ->willReturnCallback(function ($arg) use ($gid) {
if ($arg === 'groupid') {
return $gid;
}
@@ -124,7 +124,7 @@ class DeleteTest extends TestCase {
public function testDelete() {
$gid = 'myGroup';
$this->input->method('getArgument')
- ->willReturnCallback(function($arg) use ($gid) {
+ ->willReturnCallback(function ($arg) use ($gid) {
if ($arg === 'groupid') {
return $gid;
}
diff --git a/tests/Core/Command/Group/ListCommandTest.php b/tests/Core/Command/Group/ListCommandTest.php
index 21adb29924a..6f2a45c9706 100644
--- a/tests/Core/Command/Group/ListCommandTest.php
+++ b/tests/Core/Command/Group/ListCommandTest.php
@@ -56,7 +56,7 @@ class ListCommandTest extends TestCase {
$this->input = $this->createMock(InputInterface::class);
$this->input->method('getOption')
- ->willReturnCallback(function($arg) {
+ ->willReturnCallback(function ($arg) {
if ($arg === 'limit') {
return '100';
} else if ($arg === 'offset') {
diff --git a/tests/Core/Command/Group/RemoveUserTest.php b/tests/Core/Command/Group/RemoveUserTest.php
index eda4886da3b..18d8512fcaa 100644
--- a/tests/Core/Command/Group/RemoveUserTest.php
+++ b/tests/Core/Command/Group/RemoveUserTest.php
@@ -58,7 +58,7 @@ class RemoveUserTest extends TestCase {
$this->input = $this->createMock(InputInterface::class);
$this->input->method('getArgument')
- ->willReturnCallback(function($arg) {
+ ->willReturnCallback(function ($arg) {
if ($arg === 'group') {
return 'myGroup';
} else if ($arg === 'user') {
diff --git a/tests/Core/Controller/ClientFlowLoginControllerTest.php b/tests/Core/Controller/ClientFlowLoginControllerTest.php
index 211f08b929f..a997546270f 100644
--- a/tests/Core/Controller/ClientFlowLoginControllerTest.php
+++ b/tests/Core/Controller/ClientFlowLoginControllerTest.php
@@ -83,7 +83,7 @@ class ClientFlowLoginControllerTest extends TestCase {
$this->l10n
->expects($this->any())
->method('t')
- ->willReturnCallback(function($text, $parameters = []) {
+ ->willReturnCallback(function ($text, $parameters = []) {
return vsprintf($text, $parameters);
});
$this->defaults = $this->createMock(Defaults::class);
diff --git a/tests/Core/Controller/ClientFlowLoginV2ControllerTest.php b/tests/Core/Controller/ClientFlowLoginV2ControllerTest.php
index d1c3f8b7293..1e35dc71c3f 100644
--- a/tests/Core/Controller/ClientFlowLoginV2ControllerTest.php
+++ b/tests/Core/Controller/ClientFlowLoginV2ControllerTest.php
@@ -184,7 +184,7 @@ class ClientFlowLoginV2ControllerTest extends TestCase {
public function testGrantPageInvalidStateToken() {
$this->session->method('get')
- ->willReturnCallback(function($name) {
+ ->willReturnCallback(function ($name) {
return null;
});
@@ -194,7 +194,7 @@ class ClientFlowLoginV2ControllerTest extends TestCase {
public function testGrantPageInvalidLoginToken() {
$this->session->method('get')
- ->willReturnCallback(function($name) {
+ ->willReturnCallback(function ($name) {
if ($name === 'client.flow.v2.state.token') {
return 'stateToken';
}
@@ -214,7 +214,7 @@ class ClientFlowLoginV2ControllerTest extends TestCase {
public function testGrantPageValid() {
$this->session->method('get')
- ->willReturnCallback(function($name) {
+ ->willReturnCallback(function ($name) {
if ($name === 'client.flow.v2.state.token') {
return 'stateToken';
}
@@ -236,7 +236,7 @@ class ClientFlowLoginV2ControllerTest extends TestCase {
public function testGenerateAppPasswordInvalidStateToken() {
$this->session->method('get')
- ->willReturnCallback(function($name) {
+ ->willReturnCallback(function ($name) {
return null;
});
@@ -246,7 +246,7 @@ class ClientFlowLoginV2ControllerTest extends TestCase {
public function testGenerateAppPassworInvalidLoginToken() {
$this->session->method('get')
- ->willReturnCallback(function($name) {
+ ->willReturnCallback(function ($name) {
if ($name === 'client.flow.v2.state.token') {
return 'stateToken';
}
@@ -266,7 +266,7 @@ class ClientFlowLoginV2ControllerTest extends TestCase {
public function testGenerateAppPassworValid() {
$this->session->method('get')
- ->willReturnCallback(function($name) {
+ ->willReturnCallback(function ($name) {
if ($name === 'client.flow.v2.state.token') {
return 'stateToken';
}
diff --git a/tests/Core/Controller/CssControllerTest.php b/tests/Core/Controller/CssControllerTest.php
index daccee82705..d1d3ae7eb47 100644
--- a/tests/Core/Controller/CssControllerTest.php
+++ b/tests/Core/Controller/CssControllerTest.php
@@ -159,7 +159,7 @@ class CssControllerTest extends TestCase {
$folder->method('getFile')
->willReturnCallback(
- function($fileName) use ($file) {
+ function ($fileName) use ($file) {
if ($fileName === 'file.css') {
return $file;
}
diff --git a/tests/Core/Controller/JsControllerTest.php b/tests/Core/Controller/JsControllerTest.php
index 4476b3ee6ed..0b2c6a28f5b 100644
--- a/tests/Core/Controller/JsControllerTest.php
+++ b/tests/Core/Controller/JsControllerTest.php
@@ -159,7 +159,7 @@ class JsControllerTest extends TestCase {
$folder->method('getFile')
->willReturnCallback(
- function($fileName) use ($file) {
+ function ($fileName) use ($file) {
if ($fileName === 'file.js') {
return $file;
}
diff --git a/tests/Core/Controller/LoginControllerTest.php b/tests/Core/Controller/LoginControllerTest.php
index 4b2511b9ab1..80be53ed26d 100644
--- a/tests/Core/Controller/LoginControllerTest.php
+++ b/tests/Core/Controller/LoginControllerTest.php
@@ -588,7 +588,7 @@ class LoginControllerTest extends TestCase {
$this->chain->expects($this->once())
->method('process')
->with($this->equalTo($loginData))
- ->willReturnCallback(function(LoginData $data) use ($loginResult) {
+ ->willReturnCallback(function (LoginData $data) use ($loginResult) {
$data->setUsername('john');
return $loginResult;
});
diff --git a/tests/Core/Controller/LostControllerTest.php b/tests/Core/Controller/LostControllerTest.php
index 4c416947008..ffd8a5a8c02 100644
--- a/tests/Core/Controller/LostControllerTest.php
+++ b/tests/Core/Controller/LostControllerTest.php
@@ -110,7 +110,7 @@ class LostControllerTest extends \Test\TestCase {
$this->l10n
->expects($this->any())
->method('t')
- ->willReturnCallback(function($text, $parameters = []) {
+ ->willReturnCallback(function ($text, $parameters = []) {
return vsprintf($text, $parameters);
});
$this->defaults = $this->getMockBuilder('\OCP\Defaults')
@@ -766,7 +766,7 @@ class LostControllerTest extends \Test\TestCase {
$encryptionModule = $this->createMock(IEncryptionModule::class);
$encryptionModule->expects($this->once())->method('needDetailedAccessList')->willReturn(true);
$this->encryptionManager->expects($this->once())->method('getEncryptionModules')
- ->willReturn([0 => ['callback' => function() use ($encryptionModule) { return $encryptionModule; }]]);
+ ->willReturn([0 => ['callback' => function () use ($encryptionModule) { return $encryptionModule; }]]);
$response = $this->lostController->setPassword('myToken', 'user', 'newpass', false);
$expectedResponse = ['status' => 'error', 'msg' => '', 'encryption' => true];
$this->assertSame($expectedResponse, $response);
@@ -776,7 +776,7 @@ class LostControllerTest extends \Test\TestCase {
$encryptionModule = $this->createMock(IEncryptionModule::class);
$encryptionModule->expects($this->once())->method('needDetailedAccessList')->willReturn(false);
$this->encryptionManager->expects($this->once())->method('getEncryptionModules')
- ->willReturn([0 => ['callback' => function() use ($encryptionModule) { return $encryptionModule; }]]);
+ ->willReturn([0 => ['callback' => function () use ($encryptionModule) { return $encryptionModule; }]]);
$this->config->method('getUserValue')
->with('ValidTokenUser', 'core', 'lostpassword', null)
->willReturn('encryptedData');