Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-10-05 16:12:57 +0300
committerMorris Jobke <hey@morrisjobke.de>2020-10-05 21:25:24 +0300
commitd9015a8c94bfd71fe484618a06d276701d3bf9ff (patch)
tree3f7a1cd6ec2fd982dd02de71b76076f7f01cef70 /apps/dav/tests/unit
parentd357f4b10fe1b59e1e07bb90641d647522c7bfe2 (diff)
Format code to a single space around binary operators
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/dav/tests/unit')
-rw-r--r--apps/dav/tests/unit/CalDAV/BirthdayCalendar/EnablePluginTest.php2
-rw-r--r--apps/dav/tests/unit/CalDAV/CalDavBackendTest.php4
-rw-r--r--apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php4
-rw-r--r--apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php2
-rw-r--r--apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php2
-rw-r--r--apps/dav/tests/unit/CardDAV/CardDavBackendTest.php8
-rw-r--r--apps/dav/tests/unit/Comments/CommentsPluginTest.php8
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/CommentsPropertiesPluginTest.php2
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/FileTest.php4
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php4
-rw-r--r--apps/dav/tests/unit/Controller/DirectControllerTest.php2
-rw-r--r--apps/dav/tests/unit/Upload/AssemblyStreamTest.php2
12 files changed, 22 insertions, 22 deletions
diff --git a/apps/dav/tests/unit/CalDAV/BirthdayCalendar/EnablePluginTest.php b/apps/dav/tests/unit/CalDAV/BirthdayCalendar/EnablePluginTest.php
index 3d2eda235eb..0e6e76d3927 100644
--- a/apps/dav/tests/unit/CalDAV/BirthdayCalendar/EnablePluginTest.php
+++ b/apps/dav/tests/unit/CalDAV/BirthdayCalendar/EnablePluginTest.php
@@ -131,7 +131,7 @@ class EnablePluginTest extends TestCase {
$this->server->xml->expects($this->once())
->method('parse')
->willReturnCallback(function ($requestBody, $url, &$documentType) {
- $documentType = '{http://nextcloud.com/ns}disable-birthday-calendar';
+ $documentType = '{http://nextcloud.com/ns}disable-birthday-calendar';
});
$this->config->expects($this->never())
diff --git a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php
index 06b963ffb4b..157eaa1ee48 100644
--- a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php
+++ b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php
@@ -563,7 +563,7 @@ EOD;
}
public function providesSchedulingData() {
- $data =<<<EOS
+ $data = <<<EOS
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Sabre//Sabre VObject 3.5.0//EN
@@ -888,7 +888,7 @@ END:VCALENDAR
EOD;
$uriCount = count($uris);
- for ($i=0; $i < $uriCount; $i++) {
+ for ($i = 0; $i < $uriCount; $i++) {
$this->backend->createCalendarObject($calendarId,
$uris[$i], $calData[$i]);
}
diff --git a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php
index 226a7a28baf..47fcc1680f6 100644
--- a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php
+++ b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php
@@ -381,7 +381,7 @@ class EmailProviderTest extends AbstractNotificationProviderTest {
* @param array $replyTo
* @return IMessage
*/
- private function getMessageMock(string $toMail, IEMailTemplate $templateMock, array $replyTo=null):IMessage {
+ private function getMessageMock(string $toMail, IEMailTemplate $templateMock, array $replyTo = null):IMessage {
$message = $this->createMock(IMessage::class);
$i = 0;
@@ -473,7 +473,7 @@ class EmailProviderTest extends AbstractNotificationProviderTest {
return $vcalendar;
}
- private function setupURLGeneratorMock(int $times=1):void {
+ private function setupURLGeneratorMock(int $times = 1):void {
for ($i = 0; $i < $times; $i++) {
$this->urlGenerator
->expects($this->at(8 * $i))
diff --git a/apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php b/apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php
index 2195563753f..2d4cbfd0c8c 100644
--- a/apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php
+++ b/apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php
@@ -397,7 +397,7 @@ EOD;
'is_relative' => false,
'notification_date' => 1465344000,
'is_repeat_based' => false,
- 'calendardata' => self::CALENDAR_DATA,
+ 'calendardata' => self::CALENDAR_DATA,
'displayname' => 'Displayname 123',
'principaluri' => 'principals/users/user001',
],
diff --git a/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php b/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php
index 60a4ee1c046..5d1323ba8b9 100644
--- a/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php
+++ b/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php
@@ -345,7 +345,7 @@ class BirthdayServiceTest extends TestCase {
->with('principal001', 'contact_birthdays', [
'{DAV:}displayname' => 'Contact birthdays',
'{http://apple.com/ns/ical/}calendar-color' => '#E9D859',
- 'components' => 'VEVENT',
+ 'components' => 'VEVENT',
]);
$this->service->ensureCalendarExists('principal001');
}
diff --git a/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php b/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php
index 95617001b31..fe83a41038c 100644
--- a/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php
+++ b/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php
@@ -358,7 +358,7 @@ class CardDavBackendTest extends TestCase {
$this->assertArrayHasKey('lastmodified', $card);
$this->assertArrayHasKey('etag', $card);
$this->assertArrayHasKey('size', $card);
- $this->assertEquals($this->{ 'vcardTest'.($index+1) }, $card['carddata']);
+ $this->assertEquals($this->{ 'vcardTest'.($index + 1) }, $card['carddata']);
}
// delete the card
@@ -668,7 +668,7 @@ class CardDavBackendTest extends TestCase {
$vCardIds = [];
$query = $this->db->getQueryBuilder();
- for ($i=0; $i < 3; $i++) {
+ for ($i = 0; $i < 3; $i++) {
$query->insert($this->dbCardsTable)
->values(
[
@@ -767,7 +767,7 @@ class CardDavBackendTest extends TestCase {
'limit' => ['john', ['FN'], ['limit' => 1], [['uri0', 'John Doe']]],
'limit and offset' => ['john', ['FN'], ['limit' => 1, 'offset' => 1], [['uri1', 'John M. Doe']]],
'find "_" escaped' => ['_', ['CLOUD'], [], [['uri2', 'find without options']]],
- 'find not empty CLOUD' => ['%_%', ['CLOUD'], ['escape_like_param'=>false], [['uri0', 'John Doe'], ['uri2', 'find without options']]],
+ 'find not empty CLOUD' => ['%_%', ['CLOUD'], ['escape_like_param' => false], [['uri0', 'John Doe'], ['uri2', 'find without options']]],
];
}
@@ -800,7 +800,7 @@ class CardDavBackendTest extends TestCase {
public function testGetContact() {
$query = $this->db->getQueryBuilder();
- for ($i=0; $i<2; $i++) {
+ for ($i = 0; $i < 2; $i++) {
$query->insert($this->dbCardsTable)
->values(
[
diff --git a/apps/dav/tests/unit/Comments/CommentsPluginTest.php b/apps/dav/tests/unit/Comments/CommentsPluginTest.php
index c2234f116fc..02d702e9f46 100644
--- a/apps/dav/tests/unit/Comments/CommentsPluginTest.php
+++ b/apps/dav/tests/unit/Comments/CommentsPluginTest.php
@@ -668,11 +668,11 @@ class CommentsPluginTest extends \Test\TestCase {
$parameters = [
[
- 'name' => '{http://owncloud.org/ns}limit',
+ 'name' => '{http://owncloud.org/ns}limit',
'value' => 5,
],
[
- 'name' => '{http://owncloud.org/ns}offset',
+ 'name' => '{http://owncloud.org/ns}offset',
'value' => 10,
],
[
@@ -723,11 +723,11 @@ class CommentsPluginTest extends \Test\TestCase {
$parameters = [
[
- 'name' => '{http://owncloud.org/ns}limit',
+ 'name' => '{http://owncloud.org/ns}limit',
'value' => 5,
],
[
- 'name' => '{http://owncloud.org/ns}offset',
+ 'name' => '{http://owncloud.org/ns}offset',
'value' => 10,
],
[
diff --git a/apps/dav/tests/unit/Connector/Sabre/CommentsPropertiesPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/CommentsPropertiesPluginTest.php
index 9585fae9cf8..6ad053e9164 100644
--- a/apps/dav/tests/unit/Connector/Sabre/CommentsPropertiesPluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/CommentsPropertiesPluginTest.php
@@ -62,7 +62,7 @@ class CommentsPropertiesPluginTest extends \Test\TestCase {
public function nodeProvider() {
$mocks = [];
foreach (['\OCA\DAV\Connector\Sabre\File', '\OCA\DAV\Connector\Sabre\Directory', '\Sabre\DAV\INode'] as $class) {
- $mocks[] = $this->getMockBuilder($class)
+ $mocks[] = $this->getMockBuilder($class)
->disableOriginalConstructor()
->getMock();
}
diff --git a/apps/dav/tests/unit/Connector/Sabre/FileTest.php b/apps/dav/tests/unit/Connector/Sabre/FileTest.php
index 7770239fe55..f7c3de34f9d 100644
--- a/apps/dav/tests/unit/Connector/Sabre/FileTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/FileTest.php
@@ -1177,8 +1177,8 @@ class FileTest extends TestCase {
$storage = new Temporary([]);
$storage->file_put_contents('file.txt', 'old content');
$noCreateStorage = new PermissionsMask([
- 'storage'=> $storage,
- 'mask' => Constants::PERMISSION_ALL - Constants::PERMISSION_CREATE
+ 'storage' => $storage,
+ 'mask' => Constants::PERMISSION_ALL - Constants::PERMISSION_CREATE
]);
$this->registerMount($this->user, $noCreateStorage, '/' . $this->user . '/files/root');
diff --git a/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php
index 2a6bd96c543..56b83aa46b6 100644
--- a/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php
@@ -199,14 +199,14 @@ class FilesReportPluginTest extends \Test\TestCase {
$parameters = [
[
- 'name' => '{DAV:}prop',
+ 'name' => '{DAV:}prop',
'value' => [
['name' => '{DAV:}getcontentlength', 'value' => ''],
['name' => '{http://owncloud.org/ns}size', 'value' => ''],
],
],
[
- 'name' => '{http://owncloud.org/ns}filter-rules',
+ 'name' => '{http://owncloud.org/ns}filter-rules',
'value' => [
['name' => '{http://owncloud.org/ns}systemtag', 'value' => '123'],
['name' => '{http://owncloud.org/ns}systemtag', 'value' => '456'],
diff --git a/apps/dav/tests/unit/Controller/DirectControllerTest.php b/apps/dav/tests/unit/Controller/DirectControllerTest.php
index 849cabc7da5..0cfe7c5cde4 100644
--- a/apps/dav/tests/unit/Controller/DirectControllerTest.php
+++ b/apps/dav/tests/unit/Controller/DirectControllerTest.php
@@ -141,7 +141,7 @@ class DirectControllerTest extends TestCase {
$this->assertSame('awesomeUser', $direct->getUserId());
$this->assertSame(101, $direct->getFileId());
$this->assertSame('superduperlongtoken', $direct->getToken());
- $this->assertSame(42 + 60*60*8, $direct->getExpiration());
+ $this->assertSame(42 + 60 * 60 * 8, $direct->getExpiration());
});
$this->urlGenerator->method('getAbsoluteURL')
diff --git a/apps/dav/tests/unit/Upload/AssemblyStreamTest.php b/apps/dav/tests/unit/Upload/AssemblyStreamTest.php
index 6031c090ab0..ec710e8d2ca 100644
--- a/apps/dav/tests/unit/Upload/AssemblyStreamTest.php
+++ b/apps/dav/tests/unit/Upload/AssemblyStreamTest.php
@@ -80,7 +80,7 @@ class AssemblyStreamTest extends \Test\TestCase {
$tonofnodes = [];
$tonofdata = "";
for ($i = 0; $i < 101; $i++) {
- $thisdata = rand(0,100); // variable length and content
+ $thisdata = rand(0,100); // variable length and content
$tonofdata .= $thisdata;
array_push($tonofnodes, $this->buildNode($i,$thisdata));
}