summaryrefslogtreecommitdiffstats
path: root/tests/lib/Accounts
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/Accounts
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/Accounts')
-rw-r--r--tests/lib/Accounts/AccountPropertyTest.php3
-rw-r--r--tests/lib/Accounts/AccountTest.php2
-rw-r--r--tests/lib/Accounts/AccountsManagerTest.php7
-rw-r--r--tests/lib/Accounts/HooksTest.php4
4 files changed, 2 insertions, 14 deletions
diff --git a/tests/lib/Accounts/AccountPropertyTest.php b/tests/lib/Accounts/AccountPropertyTest.php
index 988fd64001d..afd807a44b4 100644
--- a/tests/lib/Accounts/AccountPropertyTest.php
+++ b/tests/lib/Accounts/AccountPropertyTest.php
@@ -33,7 +33,6 @@ use Test\TestCase;
* @package Test\Accounts
*/
class AccountPropertyTest extends TestCase {
-
public function testConstructor() {
$accountProperty = new AccountProperty(
IAccountManager::PROPERTY_WEBSITE,
@@ -97,6 +96,4 @@ class AccountPropertyTest extends TestCase {
'verified' => IAccountManager::VERIFIED
], $accountProperty->jsonSerialize());
}
-
-
}
diff --git a/tests/lib/Accounts/AccountTest.php b/tests/lib/Accounts/AccountTest.php
index 6d0e187c433..11b13637bd0 100644
--- a/tests/lib/Accounts/AccountTest.php
+++ b/tests/lib/Accounts/AccountTest.php
@@ -35,7 +35,6 @@ use Test\TestCase;
* @package Test\Accounts
*/
class AccountTest extends TestCase {
-
public function testConstructor() {
$user = $this->createMock(IUser::class);
$account = new Account($user);
@@ -108,5 +107,4 @@ class AccountTest extends TestCase {
$this->assertEquals($properties, $account->jsonSerialize());
}
-
}
diff --git a/tests/lib/Accounts/AccountsManagerTest.php b/tests/lib/Accounts/AccountsManagerTest.php
index 5bed1ff74fb..76abeb5b495 100644
--- a/tests/lib/Accounts/AccountsManagerTest.php
+++ b/tests/lib/Accounts/AccountsManagerTest.php
@@ -80,7 +80,6 @@ class AccountsManagerTest extends TestCase {
->setConstructorArgs([$this->connection, $this->eventDispatcher, $this->jobList, $this->logger])
->setMethods($mockedMethods)
->getMock();
-
}
/**
@@ -162,9 +161,8 @@ class AccountsManagerTest extends TestCase {
->with($askUser, $expectedData);
}
- if(empty($expectedData)) {
+ if (empty($expectedData)) {
$accountManager->expects($this->never())->method('addMissingDefaultValues');
-
} else {
$accountManager->expects($this->once())->method('addMissingDefaultValues')->with($expectedData)
->willReturn($expectedData);
@@ -215,7 +213,6 @@ class AccountsManagerTest extends TestCase {
}
public function testAddMissingDefaultValues() {
-
$accountManager = $this->getInstance();
$input = [
@@ -234,7 +231,6 @@ class AccountsManagerTest extends TestCase {
}
private function addDummyValuesToTable($uid, $data) {
-
$query = $this->connection->getQueryBuilder();
$query->insert($this->table)
->values(
@@ -294,5 +290,4 @@ class AccountsManagerTest extends TestCase {
->willReturn($data);
$this->assertEquals($expected, $accountManager->getAccount($user));
}
-
}
diff --git a/tests/lib/Accounts/HooksTest.php b/tests/lib/Accounts/HooksTest.php
index 433ecdedcf4..a0360404d72 100644
--- a/tests/lib/Accounts/HooksTest.php
+++ b/tests/lib/Accounts/HooksTest.php
@@ -33,7 +33,7 @@ use Test\TestCase;
* @package Test\Accounts
* @group DB
*/
-class HooksTest extends TestCase {
+class HooksTest extends TestCase {
/** @var ILogger | \PHPUnit_Framework_MockObject_MockObject */
private $logger;
@@ -89,7 +89,6 @@ class HooksTest extends TestCase {
}
$this->hooks->changeUserHook($params);
-
}
public function dataTestChangeUserHook() {
@@ -151,5 +150,4 @@ class HooksTest extends TestCase {
$result = $this->invokePrivate($hooks, 'getAccountManager');
$this->assertInstanceOf(AccountManager::class, $result);
}
-
}