summaryrefslogtreecommitdiffstats
path: root/apps/dav/tests/unit
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/tests/unit')
-rw-r--r--apps/dav/tests/unit/CalDAV/CalDavBackendTest.php4
-rw-r--r--apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/PushProviderTest.php76
-rw-r--r--apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php32
-rw-r--r--apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php10
-rw-r--r--apps/dav/tests/unit/CardDAV/CardDavBackendTest.php62
-rw-r--r--apps/dav/tests/unit/CardDAV/ContactsManagerTest.php4
-rw-r--r--apps/dav/tests/unit/CardDAV/ConverterTest.php6
-rw-r--r--apps/dav/tests/unit/CardDAV/Sharing/PluginTest.php8
-rw-r--r--apps/dav/tests/unit/CardDAV/SyncServiceTest.php70
-rw-r--r--apps/dav/tests/unit/Command/MoveCalendarTest.php4
-rw-r--r--apps/dav/tests/unit/Comments/CommentsPluginTest.php56
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/FileTest.php68
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/PrincipalTest.php8
-rw-r--r--apps/dav/tests/unit/DAV/Sharing/PluginTest.php8
-rw-r--r--apps/dav/tests/unit/DAV/SystemPrincipalBackendTest.php10
-rw-r--r--apps/dav/tests/unit/Upload/AssemblyStreamTest.php42
16 files changed, 234 insertions, 234 deletions
diff --git a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php
index fb48e5fac4b..761ed734906 100644
--- a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php
+++ b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php
@@ -548,8 +548,8 @@ EOD;
$this->assertEquals($id, $subscriptions[0]['id']);
$patch = new PropPatch([
- '{DAV:}displayname' => 'Unit test',
- '{http://apple.com/ns/ical/}calendar-color' => '#ac0606',
+ '{DAV:}displayname' => 'Unit test',
+ '{http://apple.com/ns/ical/}calendar-color' => '#ac0606',
]);
$this->backend->updateSubscription($id, $patch);
$patch->commit();
diff --git a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/PushProviderTest.php b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/PushProviderTest.php
index 76a8b5befdf..9257fe56e63 100644
--- a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/PushProviderTest.php
+++ b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/PushProviderTest.php
@@ -42,46 +42,46 @@ use OCP\Notification\INotification;
class PushProviderTest extends AbstractNotificationProviderTest {
- /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
- protected $logger;
+ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
+ protected $logger;
- /** @var L10NFactory|\PHPUnit\Framework\MockObject\MockObject */
- protected $l10nFactory;
+ /** @var L10NFactory|\PHPUnit\Framework\MockObject\MockObject */
+ protected $l10nFactory;
- /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */
- protected $l10n;
+ /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */
+ protected $l10n;
- /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
- protected $urlGenerator;
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
+ protected $urlGenerator;
- /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
- protected $config;
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
+ protected $config;
- /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
- private $manager;
+ /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
+ private $manager;
- /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */
- private $timeFactory;
+ /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */
+ private $timeFactory;
- protected function setUp(): void {
- parent::setUp();
+ protected function setUp(): void {
+ parent::setUp();
- $this->config = $this->createMock(IConfig::class);
- $this->manager = $this->createMock(IManager::class);
- $this->timeFactory = $this->createMock(ITimeFactory::class);
+ $this->config = $this->createMock(IConfig::class);
+ $this->manager = $this->createMock(IManager::class);
+ $this->timeFactory = $this->createMock(ITimeFactory::class);
- $this->provider = new PushProvider(
- $this->config,
- $this->manager,
- $this->logger,
- $this->l10nFactory,
- $this->urlGenerator,
- $this->timeFactory
- );
- }
+ $this->provider = new PushProvider(
+ $this->config,
+ $this->manager,
+ $this->logger,
+ $this->l10nFactory,
+ $this->urlGenerator,
+ $this->timeFactory
+ );
+ }
- public function testNotificationType():void {
- $this->assertEquals(PushProvider::NOTIFICATION_TYPE, 'DISPLAY');
+ public function testNotificationType():void {
+ $this->assertEquals(PushProvider::NOTIFICATION_TYPE, 'DISPLAY');
}
public function testNotSend(): void {
@@ -110,19 +110,19 @@ class PushProviderTest extends AbstractNotificationProviderTest {
$this->provider->send($this->vcalendar->VEVENT, $this->calendarDisplayName, $users);
}
- public function testSend(): void {
- $this->config->expects($this->once())
+ public function testSend(): void {
+ $this->config->expects($this->once())
->method('getAppValue')
->with('dav', 'sendEventRemindersPush', 'no')
->willReturn('yes');
- $user1 = $this->createMock(IUser::class);
- $user1->method('getUID')
+ $user1 = $this->createMock(IUser::class);
+ $user1->method('getUID')
->willReturn('uid1');
- $user2 = $this->createMock(IUser::class);
+ $user2 = $this->createMock(IUser::class);
$user2->method('getUID')
->willReturn('uid2');
- $user3 = $this->createMock(IUser::class);
+ $user3 = $this->createMock(IUser::class);
$user3->method('getUID')
->willReturn('uid3');
@@ -161,13 +161,13 @@ class PushProviderTest extends AbstractNotificationProviderTest {
->with($notification3);
$this->provider->send($this->vcalendar->VEVENT, $this->calendarDisplayName, $users);
- }
+ }
/**
* @param string $uid
* @param \DateTime $dt
*/
- private function createNotificationMock(string $uid, \DateTime $dt):INotification {
+ private function createNotificationMock(string $uid, \DateTime $dt):INotification {
$notification = $this->createMock(INotification::class);
$notification
->expects($this->once())
diff --git a/apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php b/apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php
index 76ff0a6a330..11ecdbc354b 100644
--- a/apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php
+++ b/apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php
@@ -42,11 +42,11 @@ use Test\TestCase;
class ReminderServiceTest extends TestCase {
- /** @var Backend|\PHPUnit\Framework\MockObject\MockObject */
- private $backend;
+ /** @var Backend|\PHPUnit\Framework\MockObject\MockObject */
+ private $backend;
- /** @var NotificationProviderManager|\PHPUnit\Framework\MockObject\MockObject */
- private $notificationProviderManager;
+ /** @var NotificationProviderManager|\PHPUnit\Framework\MockObject\MockObject */
+ private $notificationProviderManager;
/** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
private $userManager;
@@ -185,12 +185,12 @@ END:VEVENT
END:VCALENDAR
EOD;
- protected function setUp(): void {
+ protected function setUp(): void {
parent::setUp();
- $this->backend = $this->createMock(Backend::class);
- $this->notificationProviderManager = $this->createMock(NotificationProviderManager::class);
- $this->userManager = $this->createMock(IUserManager::class);
+ $this->backend = $this->createMock(Backend::class);
+ $this->notificationProviderManager = $this->createMock(NotificationProviderManager::class);
+ $this->userManager = $this->createMock(IUserManager::class);
$this->groupManager = $this->createMock(IGroupManager::class);
$this->caldavBackend = $this->createMock(CalDavBackend::class);
$this->timeFactory = $this->createMock(ITimeFactory::class);
@@ -203,14 +203,14 @@ EOD;
$this->groupManager,
$this->caldavBackend,
$this->timeFactory);
- }
+ }
public function testOnCalendarObjectDelete():void {
- $this->backend->expects($this->once())
+ $this->backend->expects($this->once())
->method('cleanRemindersForEvent')
->with(44);
- $action = '\OCA\DAV\CalDAV\CalDavBackend::deleteCalendarObject';
+ $action = '\OCA\DAV\CalDAV\CalDavBackend::deleteCalendarObject';
$objectData = [
'id' => '44',
'component' => 'vevent',
@@ -221,14 +221,14 @@ EOD;
public function testOnCalendarObjectCreateSingleEntry():void {
$action = '\OCA\DAV\CalDAV\CalDavBackend::createCalendarObject';
- $objectData = [
- 'calendardata' => self::CALENDAR_DATA,
+ $objectData = [
+ 'calendardata' => self::CALENDAR_DATA,
'id' => '42',
'calendarid' => '1337',
'component' => 'vevent',
];
- $this->backend->expects($this->exactly(2))
+ $this->backend->expects($this->exactly(2))
->method('insertReminder')
->withConsecutive(
[1337, 42, 'wej2z68l9h', false, 1465430400, false, '5c70531aab15c92b52518ae10a2f78a4', 'de919af7429d3b5c11e8b9d289b411a6', 'EMAIL', true, 1465429500, false],
@@ -236,12 +236,12 @@ EOD;
)
->willReturn(1);
- $this->timeFactory->expects($this->once())
+ $this->timeFactory->expects($this->once())
->method('getDateTime')
->with()
->willReturn(\DateTime::createFromFormat(\DateTime::ATOM, '2016-06-08T00:00:00+00:00'));
- $this->reminderService->onTouchCalendarObject($action, $objectData);
+ $this->reminderService->onTouchCalendarObject($action, $objectData);
}
public function testOnCalendarObjectCreateSingleEntryWithRepeat(): void {
diff --git a/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php b/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php
index 3d36b76e6ee..e132f082556 100644
--- a/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php
+++ b/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php
@@ -157,14 +157,14 @@ class BirthdayServiceTest extends TestCase {
$this->cardDav->expects($this->once())->method('getAddressBookById')
->with(666)
->willReturn([
- 'principaluri' => 'principals/users/user01',
- 'uri' => 'default'
- ]);
+ 'principaluri' => 'principals/users/user01',
+ 'uri' => 'default'
+ ]);
$this->calDav->expects($this->once())->method('getCalendarByUri')
->with('principals/users/user01', 'contact_birthdays')
->willReturn([
- 'id' => 1234
- ]);
+ 'id' => 1234
+ ]);
$this->calDav->expects($this->at(1))->method('deleteCalendarObject')->with(1234, 'default-gump.vcf.ics');
$this->calDav->expects($this->at(2))->method('deleteCalendarObject')->with(1234, 'default-gump.vcf-death.ics');
$this->calDav->expects($this->at(3))->method('deleteCalendarObject')->with(1234, 'default-gump.vcf-anniversary.ics');
diff --git a/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php b/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php
index 9298edb53ad..5efce1c23be 100644
--- a/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php
+++ b/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php
@@ -135,7 +135,7 @@ class CardDavBackendTest extends TestCase {
$this->createMock(IAppManager::class),
$this->createMock(ProxyMapper::class),
$this->createMock(IConfig::class),
- ])
+ ])
->setMethods(['getPrincipalByPath', 'getGroupMembership'])
->getMock();
$this->principal->method('getPrincipalByPath')
@@ -668,12 +668,12 @@ class CardDavBackendTest extends TestCase {
$query->insert($this->dbCardsTable)
->values(
[
- 'addressbookid' => $query->createNamedParameter(0),
- 'carddata' => $query->createNamedParameter($vCards[$i]->serialize(), IQueryBuilder::PARAM_LOB),
- 'uri' => $query->createNamedParameter('uri' . $i),
- 'lastmodified' => $query->createNamedParameter(time()),
- 'etag' => $query->createNamedParameter('etag' . $i),
- 'size' => $query->createNamedParameter(120),
+ 'addressbookid' => $query->createNamedParameter(0),
+ 'carddata' => $query->createNamedParameter($vCards[$i]->serialize(), IQueryBuilder::PARAM_LOB),
+ 'uri' => $query->createNamedParameter('uri' . $i),
+ 'lastmodified' => $query->createNamedParameter(time()),
+ 'etag' => $query->createNamedParameter('etag' . $i),
+ 'size' => $query->createNamedParameter(120),
]
);
$query->execute();
@@ -694,11 +694,11 @@ class CardDavBackendTest extends TestCase {
$query->insert($this->dbCardsPropertiesTable)
->values(
[
- 'addressbookid' => $query->createNamedParameter(0),
- 'cardid' => $query->createNamedParameter($vCardIds[0]),
- 'name' => $query->createNamedParameter('CLOUD'),
- 'value' => $query->createNamedParameter('John@nextcloud.com'),
- 'preferred' => $query->createNamedParameter(0)
+ 'addressbookid' => $query->createNamedParameter(0),
+ 'cardid' => $query->createNamedParameter($vCardIds[0]),
+ 'name' => $query->createNamedParameter('CLOUD'),
+ 'value' => $query->createNamedParameter('John@nextcloud.com'),
+ 'preferred' => $query->createNamedParameter(0)
]
);
$query->execute();
@@ -755,13 +755,13 @@ class CardDavBackendTest extends TestCase {
public function dataTestSearch() {
return [
- ['John', ['FN'], [], [['uri0', 'John Doe'], ['uri1', 'John M. Doe']]],
- ['M. Doe', ['FN'], [], [['uri1', 'John M. Doe']]],
- ['Do', ['FN'], [], [['uri0', 'John Doe'], ['uri1', 'John M. Doe']]],
- 'check if duplicates are handled correctly' => ['John', ['FN', 'CLOUD'], [], [['uri0', 'John Doe'], ['uri1', 'John M. Doe']]],
- 'case insensitive' => ['john', ['FN'], [], [['uri0', 'John Doe'], ['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']]],
+ ['John', ['FN'], [], [['uri0', 'John Doe'], ['uri1', 'John M. Doe']]],
+ ['M. Doe', ['FN'], [], [['uri1', 'John M. Doe']]],
+ ['Do', ['FN'], [], [['uri0', 'John Doe'], ['uri1', 'John M. Doe']]],
+ 'check if duplicates are handled correctly' => ['John', ['FN', 'CLOUD'], [], [['uri0', 'John Doe'], ['uri1', 'John M. Doe']]],
+ 'case insensitive' => ['john', ['FN'], [], [['uri0', 'John Doe'], ['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']]],
];
}
@@ -770,12 +770,12 @@ class CardDavBackendTest extends TestCase {
$query->insert($this->dbCardsTable)
->values(
[
- 'addressbookid' => $query->createNamedParameter(1),
- 'carddata' => $query->createNamedParameter('carddata', IQueryBuilder::PARAM_LOB),
- 'uri' => $query->createNamedParameter('uri'),
- 'lastmodified' => $query->createNamedParameter(5489543),
- 'etag' => $query->createNamedParameter('etag'),
- 'size' => $query->createNamedParameter(120),
+ 'addressbookid' => $query->createNamedParameter(1),
+ 'carddata' => $query->createNamedParameter('carddata', IQueryBuilder::PARAM_LOB),
+ 'uri' => $query->createNamedParameter('uri'),
+ 'lastmodified' => $query->createNamedParameter(5489543),
+ 'etag' => $query->createNamedParameter('etag'),
+ 'size' => $query->createNamedParameter(120),
]
);
$query->execute();
@@ -798,12 +798,12 @@ class CardDavBackendTest extends TestCase {
$query->insert($this->dbCardsTable)
->values(
[
- 'addressbookid' => $query->createNamedParameter($i),
- 'carddata' => $query->createNamedParameter('carddata' . $i, IQueryBuilder::PARAM_LOB),
- 'uri' => $query->createNamedParameter('uri' . $i),
- 'lastmodified' => $query->createNamedParameter(5489543),
- 'etag' => $query->createNamedParameter('etag' . $i),
- 'size' => $query->createNamedParameter(120),
+ 'addressbookid' => $query->createNamedParameter($i),
+ 'carddata' => $query->createNamedParameter('carddata' . $i, IQueryBuilder::PARAM_LOB),
+ 'uri' => $query->createNamedParameter('uri' . $i),
+ 'lastmodified' => $query->createNamedParameter(5489543),
+ 'etag' => $query->createNamedParameter('etag' . $i),
+ 'size' => $query->createNamedParameter(120),
]
);
$query->execute();
diff --git a/apps/dav/tests/unit/CardDAV/ContactsManagerTest.php b/apps/dav/tests/unit/CardDAV/ContactsManagerTest.php
index 1f9a6c50844..12ce1bca5c3 100644
--- a/apps/dav/tests/unit/CardDAV/ContactsManagerTest.php
+++ b/apps/dav/tests/unit/CardDAV/ContactsManagerTest.php
@@ -41,8 +41,8 @@ class ContactsManagerTest extends TestCase {
/** @var CardDavBackend | \PHPUnit_Framework_MockObject_MockObject $backEnd */
$backEnd = $this->getMockBuilder(CardDavBackend::class)->disableOriginalConstructor()->getMock();
$backEnd->method('getAddressBooksForUser')->willReturn([
- ['{DAV:}displayname' => 'Test address book', 'uri' => 'default'],
- ]);
+ ['{DAV:}displayname' => 'Test address book', 'uri' => 'default'],
+ ]);
$l = $this->createMock(IL10N::class);
$app = new ContactsManager($backEnd, $l);
diff --git a/apps/dav/tests/unit/CardDAV/ConverterTest.php b/apps/dav/tests/unit/CardDAV/ConverterTest.php
index 0c129b0de7d..7e93c05a3fc 100644
--- a/apps/dav/tests/unit/CardDAV/ConverterTest.php
+++ b/apps/dav/tests/unit/CardDAV/ConverterTest.php
@@ -192,9 +192,9 @@ class ConverterTest extends TestCase {
public function providesNames() {
return [
- ['Sauron;;;;', 'Sauron'],
- ['Baggins;Bilbo;;;', 'Bilbo Baggins'],
- ['Tolkien;John;Ronald Reuel;;', 'John Ronald Reuel Tolkien'],
+ ['Sauron;;;;', 'Sauron'],
+ ['Baggins;Bilbo;;;', 'Bilbo Baggins'],
+ ['Tolkien;John;Ronald Reuel;;', 'John Ronald Reuel Tolkien'],
];
}
diff --git a/apps/dav/tests/unit/CardDAV/Sharing/PluginTest.php b/apps/dav/tests/unit/CardDAV/Sharing/PluginTest.php
index d5ad784d70d..7de2ea2f56a 100644
--- a/apps/dav/tests/unit/CardDAV/Sharing/PluginTest.php
+++ b/apps/dav/tests/unit/CardDAV/Sharing/PluginTest.php
@@ -69,10 +69,10 @@ class PluginTest extends TestCase {
public function testSharing() {
$this->book->expects($this->once())->method('updateShares')->with([[
- 'href' => 'principal:principals/admin',
- 'commonName' => null,
- 'summary' => null,
- 'readOnly' => false
+ 'href' => 'principal:principals/admin',
+ 'commonName' => null,
+ 'summary' => null,
+ 'readOnly' => false
]], ['mailto:wilfredo@example.com']);
// setup request
diff --git a/apps/dav/tests/unit/CardDAV/SyncServiceTest.php b/apps/dav/tests/unit/CardDAV/SyncServiceTest.php
index 40243020e9b..9015528763f 100644
--- a/apps/dav/tests/unit/CardDAV/SyncServiceTest.php
+++ b/apps/dav/tests/unit/CardDAV/SyncServiceTest.php
@@ -131,41 +131,41 @@ class SyncServiceTest extends TestCase {
$accountManager = $this->getMockBuilder(AccountManager::class)->disableOriginalConstructor()->getMock();
$accountManager->expects($this->any())->method('getUser')
->willReturn([
- AccountManager::PROPERTY_DISPLAYNAME =>
- [
- 'value' => $user->getDisplayName(),
- 'scope' => AccountManager::VISIBILITY_CONTACTS_ONLY,
- ],
- AccountManager::PROPERTY_ADDRESS =>
- [
- 'value' => '',
- 'scope' => AccountManager::VISIBILITY_PRIVATE,
- ],
- AccountManager::PROPERTY_WEBSITE =>
- [
- 'value' => '',
- 'scope' => AccountManager::VISIBILITY_PRIVATE,
- ],
- AccountManager::PROPERTY_EMAIL =>
- [
- 'value' => $user->getEMailAddress(),
- 'scope' => AccountManager::VISIBILITY_CONTACTS_ONLY,
- ],
- AccountManager::PROPERTY_AVATAR =>
- [
- 'scope' => AccountManager::VISIBILITY_CONTACTS_ONLY
- ],
- AccountManager::PROPERTY_PHONE =>
- [
- 'value' => '',
- 'scope' => AccountManager::VISIBILITY_PRIVATE,
- ],
- AccountManager::PROPERTY_TWITTER =>
- [
- 'value' => '',
- 'scope' => AccountManager::VISIBILITY_PRIVATE,
- ],
- ]
+ AccountManager::PROPERTY_DISPLAYNAME =>
+ [
+ 'value' => $user->getDisplayName(),
+ 'scope' => AccountManager::VISIBILITY_CONTACTS_ONLY,
+ ],
+ AccountManager::PROPERTY_ADDRESS =>
+ [
+ 'value' => '',
+ 'scope' => AccountManager::VISIBILITY_PRIVATE,
+ ],
+ AccountManager::PROPERTY_WEBSITE =>
+ [
+ 'value' => '',
+ 'scope' => AccountManager::VISIBILITY_PRIVATE,
+ ],
+ AccountManager::PROPERTY_EMAIL =>
+ [
+ 'value' => $user->getEMailAddress(),
+ 'scope' => AccountManager::VISIBILITY_CONTACTS_ONLY,
+ ],
+ AccountManager::PROPERTY_AVATAR =>
+ [
+ 'scope' => AccountManager::VISIBILITY_CONTACTS_ONLY
+ ],
+ AccountManager::PROPERTY_PHONE =>
+ [
+ 'value' => '',
+ 'scope' => AccountManager::VISIBILITY_PRIVATE,
+ ],
+ AccountManager::PROPERTY_TWITTER =>
+ [
+ 'value' => '',
+ 'scope' => AccountManager::VISIBILITY_PRIVATE,
+ ],
+ ]
);
$ss = new SyncService($backend, $userManager, $logger, $accountManager);
diff --git a/apps/dav/tests/unit/Command/MoveCalendarTest.php b/apps/dav/tests/unit/Command/MoveCalendarTest.php
index ff6cdbd0335..36553ff65a2 100644
--- a/apps/dav/tests/unit/Command/MoveCalendarTest.php
+++ b/apps/dav/tests/unit/Command/MoveCalendarTest.php
@@ -262,7 +262,7 @@ class MoveCalendarTest extends TestCase {
->with(1234)
->willReturn([
['href' => 'principal:principals/groups/nextclouders']
- ]);
+ ]);
if ($shareWithGroupMembersOnly === true) {
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage("User <user2> is not part of the group <nextclouders> with whom the calendar <personal> was shared. You may use -f to move the calendar while deleting this share.");
@@ -412,7 +412,7 @@ class MoveCalendarTest extends TestCase {
'href' => 'principal:principals/users/user2',
'{DAV:}displayname' => 'Personal'
]
- ]);
+ ]);
if ($force === false) {
$this->expectException(InvalidArgumentException::class);
diff --git a/apps/dav/tests/unit/Comments/CommentsPluginTest.php b/apps/dav/tests/unit/Comments/CommentsPluginTest.php
index 4844aab6b1b..7210e96b122 100644
--- a/apps/dav/tests/unit/Comments/CommentsPluginTest.php
+++ b/apps/dav/tests/unit/Comments/CommentsPluginTest.php
@@ -182,11 +182,11 @@ class CommentsPluginTest extends \Test\TestCase {
];
$comment = new Comment([
- 'objectType' => 'files',
- 'objectId' => '666',
- 'actorType' => 'users',
- 'actorId' => 'alice'
- ] + $commentData);
+ 'objectType' => 'files',
+ 'objectId' => '666',
+ 'actorType' => 'users',
+ 'actorId' => 'alice'
+ ] + $commentData);
$comment->setId('23');
$path = 'comments/files/666';
@@ -264,11 +264,11 @@ class CommentsPluginTest extends \Test\TestCase {
];
$comment = new Comment([
- 'objectType' => 'files',
- 'objectId' => '42',
- 'actorType' => 'users',
- 'actorId' => 'alice'
- ] + $commentData);
+ 'objectType' => 'files',
+ 'objectId' => '42',
+ 'actorType' => 'users',
+ 'actorId' => 'alice'
+ ] + $commentData);
$comment->setId('23');
$path = 'comments/files/42';
@@ -352,11 +352,11 @@ class CommentsPluginTest extends \Test\TestCase {
];
$comment = new Comment([
- 'objectType' => 'files',
- 'objectId' => '42',
- 'actorType' => 'users',
- 'actorId' => 'alice'
- ] + $commentData);
+ 'objectType' => 'files',
+ 'objectId' => '42',
+ 'actorType' => 'users',
+ 'actorId' => 'alice'
+ ] + $commentData);
$comment->setId('23');
$path = 'comments/files/42';
@@ -440,13 +440,13 @@ class CommentsPluginTest extends \Test\TestCase {
];
$comment = new Comment([
- 'objectType' => 'files',
- 'objectId' => '42',
- 'actorType' => 'users',
- 'actorId' => 'alice',
- 'message' => 'dummy',
- 'verb' => 'dummy'
- ]);
+ 'objectType' => 'files',
+ 'objectId' => '42',
+ 'actorType' => 'users',
+ 'actorId' => 'alice',
+ 'message' => 'dummy',
+ 'verb' => 'dummy'
+ ]);
$comment->setId('23');
$path = 'comments/files/42';
@@ -535,12 +535,12 @@ class CommentsPluginTest extends \Test\TestCase {
];
$comment = new Comment([
- 'objectType' => 'files',
- 'objectId' => '42',
- 'actorType' => 'users',
- 'actorId' => 'alice',
- 'verb' => 'comment',
- ]);
+ 'objectType' => 'files',
+ 'objectId' => '42',
+ 'actorType' => 'users',
+ 'actorId' => 'alice',
+ 'verb' => 'comment',
+ ]);
$comment->setId('23');
$path = 'comments/files/42';
diff --git a/apps/dav/tests/unit/Connector/Sabre/FileTest.php b/apps/dav/tests/unit/Connector/Sabre/FileTest.php
index 4c87351116c..d366726e919 100644
--- a/apps/dav/tests/unit/Connector/Sabre/FileTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/FileTest.php
@@ -350,52 +350,52 @@ class FileTest extends TestCase {
public function legalMtimeProvider() {
return [
"string" => [
- 'HTTP_X_OC_MTIME' => "string",
- 'expected result' => null
+ 'HTTP_X_OC_MTIME' => "string",
+ 'expected result' => null
],
"castable string (int)" => [
- 'HTTP_X_OC_MTIME' => "34",
- 'expected result' => 34
+ 'HTTP_X_OC_MTIME' => "34",
+ 'expected result' => 34
],
"castable string (float)" => [
- 'HTTP_X_OC_MTIME' => "34.56",
- 'expected result' => 34
+ 'HTTP_X_OC_MTIME' => "34.56",
+ 'expected result' => 34
],
"float" => [
- 'HTTP_X_OC_MTIME' => 34.56,
- 'expected result' => 34
+ 'HTTP_X_OC_MTIME' => 34.56,
+ 'expected result' => 34
],
"zero" => [
- 'HTTP_X_OC_MTIME' => 0,
- 'expected result' => 0
+ 'HTTP_X_OC_MTIME' => 0,
+ 'expected result' => 0
],
"zero string" => [
- 'HTTP_X_OC_MTIME' => "0",
- 'expected result' => 0
+ 'HTTP_X_OC_MTIME' => "0",
+ 'expected result' => 0
],
"negative zero string" => [
- 'HTTP_X_OC_MTIME' => "-0",
- 'expected result' => 0
+ 'HTTP_X_OC_MTIME' => "-0",
+ 'expected result' => 0
],
"string starting with number following by char" => [
- 'HTTP_X_OC_MTIME' => "2345asdf",
- 'expected result' => null
+ 'HTTP_X_OC_MTIME' => "2345asdf",
+ 'expected result' => null
],
"string castable hex int" => [
- 'HTTP_X_OC_MTIME' => "0x45adf",
- 'expected result' => null
+ 'HTTP_X_OC_MTIME' => "0x45adf",
+ 'expected result' => null
],
"string that looks like invalid hex int" => [
- 'HTTP_X_OC_MTIME' => "0x123g",
- 'expected result' => null
+ 'HTTP_X_OC_MTIME' => "0x123g",
+ 'expected result' => null
],
"negative int" => [
- 'HTTP_X_OC_MTIME' => -34,
- 'expected result' => -34
+ 'HTTP_X_OC_MTIME' => -34,
+ 'expected result' => -34
],
"negative float" => [
- 'HTTP_X_OC_MTIME' => -34.43,
- 'expected result' => -34
+ 'HTTP_X_OC_MTIME' => -34.43,
+ 'expected result' => -34
],
];
}
@@ -406,9 +406,9 @@ class FileTest extends TestCase {
*/
public function testPutSingleFileLegalMtime($requestMtime, $resultMtime) {
$request = new \OC\AppFramework\Http\Request([
- 'server' => [
- 'HTTP_X_OC_MTIME' => $requestMtime,
- ]
+ 'server' => [
+ 'HTTP_X_OC_MTIME' => $requestMtime,
+ ]
], null, $this->config, null);
$file = 'foo.txt';
@@ -430,9 +430,9 @@ class FileTest extends TestCase {
*/
public function testChunkedPutLegalMtime($requestMtime, $resultMtime) {
$request = new \OC\AppFramework\Http\Request([
- 'server' => [
- 'HTTP_X_OC_MTIME' => $requestMtime,
- ]
+ 'server' => [
+ 'HTTP_X_OC_MTIME' => $requestMtime,
+ ]
], null, $this->config, null);
$_SERVER['HTTP_OC_CHUNKED'] = true;
@@ -1105,10 +1105,10 @@ class FileTest extends TestCase {
$userView = Filesystem::getView();
}
return [
- "filesize" => $userView->filesize($path),
- "mtime" => $userView->filemtime($path),
- "filetype" => $userView->filetype($path),
- "mimetype" => $userView->getMimeType($path)
+ "filesize" => $userView->filesize($path),
+ "mtime" => $userView->filemtime($path),
+ "filetype" => $userView->filetype($path),
+ "mimetype" => $userView->getMimeType($path)
];
}
diff --git a/apps/dav/tests/unit/Connector/Sabre/PrincipalTest.php b/apps/dav/tests/unit/Connector/Sabre/PrincipalTest.php
index 8f2ee2b6643..cb4104044b7 100644
--- a/apps/dav/tests/unit/Connector/Sabre/PrincipalTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/PrincipalTest.php
@@ -335,7 +335,7 @@ class PrincipalTest extends TestCase {
'principals/groups/group1',
'principals/groups/foo%2Fbar',
'proxyId1/calendar-proxy-read',
- 'proxyId2/calendar-proxy-write',
+ 'proxyId2/calendar-proxy-write',
];
$response = $this->connector->getGroupMembership('principals/users/foo');
$this->assertSame($expectedResponse, $response);
@@ -545,9 +545,9 @@ class PrincipalTest extends TestCase {
->willReturn([$user2, $user3]);
$this->assertEquals([
- 'principals/users/user2',
- 'principals/users/user3',
- ], $this->connector->searchPrincipals('principals/users',
+ 'principals/users/user2',
+ 'principals/users/user3',
+ ], $this->connector->searchPrincipals('principals/users',
['{urn:ietf:params:xml:ns:caldav}calendar-user-address-set' => 'user@example.com']));
}
diff --git a/apps/dav/tests/unit/DAV/Sharing/PluginTest.php b/apps/dav/tests/unit/DAV/Sharing/PluginTest.php
index 4063aac5f0d..9d8d2d925f7 100644
--- a/apps/dav/tests/unit/DAV/Sharing/PluginTest.php
+++ b/apps/dav/tests/unit/DAV/Sharing/PluginTest.php
@@ -71,10 +71,10 @@ class PluginTest extends TestCase {
public function testSharing() {
$this->book->expects($this->once())->method('updateShares')->with([[
- 'href' => 'principal:principals/admin',
- 'commonName' => null,
- 'summary' => null,
- 'readOnly' => false
+ 'href' => 'principal:principals/admin',
+ 'commonName' => null,
+ 'summary' => null,
+ 'readOnly' => false
]], ['mailto:wilfredo@example.com']);
// setup request
diff --git a/apps/dav/tests/unit/DAV/SystemPrincipalBackendTest.php b/apps/dav/tests/unit/DAV/SystemPrincipalBackendTest.php
index eec2558ee9d..698e39a5218 100644
--- a/apps/dav/tests/unit/DAV/SystemPrincipalBackendTest.php
+++ b/apps/dav/tests/unit/DAV/SystemPrincipalBackendTest.php
@@ -48,10 +48,10 @@ class SystemPrincipalBackendTest extends TestCase {
'uri' => 'principals/system/system',
'{DAV:}displayname' => 'system',
],
- [
- 'uri' => 'principals/system/public',
- '{DAV:}displayname' => 'public',
- ]
+ [
+ 'uri' => 'principals/system/public',
+ '{DAV:}displayname' => 'public',
+ ]
], 'principals/system'],
];
}
@@ -125,7 +125,7 @@ class SystemPrincipalBackendTest extends TestCase {
public function providesPrincipalForGetGroupMembership() {
return [
- ['principals/system/a'],
+ ['principals/system/a'],
];
}
diff --git a/apps/dav/tests/unit/Upload/AssemblyStreamTest.php b/apps/dav/tests/unit/Upload/AssemblyStreamTest.php
index f513a68f068..2a4c832c71c 100644
--- a/apps/dav/tests/unit/Upload/AssemblyStreamTest.php
+++ b/apps/dav/tests/unit/Upload/AssemblyStreamTest.php
@@ -87,41 +87,41 @@ class AssemblyStreamTest extends \Test\TestCase {
return[
'one node zero bytes' => [
'', [
- $this->buildNode('0', '')
- ]],
+ $this->buildNode('0', '')
+ ]],
'one node only' => [
'1234567890', [
- $this->buildNode('0', '1234567890')
- ]],
+ $this->buildNode('0', '1234567890')
+ ]],
'one node buffer boundary' => [
$data8k, [
- $this->buildNode('0', $data8k)
- ]],
+ $this->buildNode('0', $data8k)
+ ]],
'two nodes' => [
'1234567890', [
- $this->buildNode('1', '67890'),
- $this->buildNode('0', '12345')
- ]],
+ $this->buildNode('1', '67890'),
+ $this->buildNode('0', '12345')
+ ]],
'two nodes end on buffer boundary' => [
$data8k . $data8k, [
- $this->buildNode('1', $data8k),
- $this->buildNode('0', $data8k)
- ]],
+ $this->buildNode('1', $data8k),
+ $this->buildNode('0', $data8k)
+ ]],
'two nodes with one on buffer boundary' => [
$data8k . $dataLess8k, [
- $this->buildNode('1', $dataLess8k),
- $this->buildNode('0', $data8k)
- ]],
+ $this->buildNode('1', $dataLess8k),
+ $this->buildNode('0', $data8k)
+ ]],
'two nodes on buffer boundary plus one byte' => [
$data8k . 'X' . $data8k, [
- $this->buildNode('1', $data8k),
- $this->buildNode('0', $data8k . 'X')
- ]],
+ $this->buildNode('1', $data8k),
+ $this->buildNode('0', $data8k . 'X')
+ ]],
'two nodes on buffer boundary plus one byte at the end' => [
$data8k . $data8k . 'X', [
- $this->buildNode('1', $data8k . 'X'),
- $this->buildNode('0', $data8k)
- ]],
+ $this->buildNode('1', $data8k . 'X'),
+ $this->buildNode('0', $data8k)
+ ]],
'a ton of nodes' => [
$tonofdata, $tonofnodes
]