aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Encryption/UpdateTest.php
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-10 14:19:56 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-10 14:19:56 +0200
commitcaff1023ea72bb2ea94130e18a2a6e2ccf819e5f (patch)
tree186d494c2aea5dea7255d3584ef5d595fc6e6194 /tests/lib/Encryption/UpdateTest.php
parentedf8ce32cffdb920e8171207b342abbd7f1fbe73 (diff)
downloadnextcloud-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/Encryption/UpdateTest.php')
-rw-r--r--tests/lib/Encryption/UpdateTest.php8
1 files changed, 1 insertions, 7 deletions
diff --git a/tests/lib/Encryption/UpdateTest.php b/tests/lib/Encryption/UpdateTest.php
index a783c620a5b..d7aa24d1f67 100644
--- a/tests/lib/Encryption/UpdateTest.php
+++ b/tests/lib/Encryption/UpdateTest.php
@@ -88,7 +88,6 @@ class UpdateTest extends TestCase {
* @param integer $numberOfFiles
*/
public function testUpdate($path, $isDir, $allFiles, $numberOfFiles) {
-
$this->encryptionManager->expects($this->once())
->method('getEncryptionModule')
->willReturn($this->encryptionModule);
@@ -97,7 +96,7 @@ class UpdateTest extends TestCase {
->method('is_dir')
->willReturn($isDir);
- if($isDir) {
+ if ($isDir) {
$this->util->expects($this->once())
->method('getAllFiles')
->willReturn($allFiles);
@@ -134,7 +133,6 @@ class UpdateTest extends TestCase {
* @param boolean $encryptionEnabled
*/
public function testPostRename($source, $target, $encryptionEnabled) {
-
$updateMock = $this->getUpdateMock(['update', 'getOwnerPath']);
$this->encryptionManager->expects($this->once())
@@ -153,7 +151,6 @@ class UpdateTest extends TestCase {
$path,
'update needs to be executed for the target destination');
return ['owner', $path];
-
});
$updateMock->expects($this->once())->method('update');
}
@@ -184,7 +181,6 @@ class UpdateTest extends TestCase {
* @param boolean $encryptionEnabled
*/
public function testPostRestore($encryptionEnabled) {
-
$updateMock = $this->getUpdateMock(['update']);
$this->encryptionManager->expects($this->once())
@@ -193,7 +189,6 @@ class UpdateTest extends TestCase {
if ($encryptionEnabled) {
$updateMock->expects($this->once())->method('update');
-
} else {
$updateMock->expects($this->never())->method('update');
}
@@ -232,5 +227,4 @@ class UpdateTest extends TestCase {
]
)->setMethods($methods)->getMock();
}
-
}