diff options
Diffstat (limited to 'apps/dav')
28 files changed, 331 insertions, 331 deletions
diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index bef0a9e7194..cf06cb5ab25 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -772,7 +772,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription [ 'calendarId' => $calendarId, 'calendarData' => $this->getCalendarById($calendarId), - ])); + ])); return $calendarId; } @@ -833,7 +833,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription 'calendarData' => $this->getCalendarById($calendarId), 'shares' => $this->getShares($calendarId), 'propertyMutations' => $mutations, - ])); + ])); return true; }); @@ -852,7 +852,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription 'calendarId' => $calendarId, 'calendarData' => $this->getCalendarById($calendarId), 'shares' => $this->getShares($calendarId), - ])); + ])); $stmt = $this->db->prepare('DELETE FROM `*PREFIX*calendarobjects` WHERE `calendarid` = ? AND `calendartype` = ?'); $stmt->execute([$calendarId, self::CALENDAR_TYPE_CALENDAR]); @@ -2095,11 +2095,11 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription } return [ - 'uri' => $row['uri'], - 'calendardata' => $row['calendardata'], - 'lastmodified' => $row['lastmodified'], - 'etag' => '"' . $row['etag'] . '"', - 'size' => (int)$row['size'], + 'uri' => $row['uri'], + 'calendardata' => $row['calendardata'], + 'lastmodified' => $row['lastmodified'], + 'etag' => '"' . $row['etag'] . '"', + 'size' => (int)$row['size'], ]; } @@ -2124,11 +2124,11 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription $result = []; foreach($stmt->fetchAll(\PDO::FETCH_ASSOC) as $row) { $result[] = [ - 'calendardata' => $row['calendardata'], - 'uri' => $row['uri'], - 'lastmodified' => $row['lastmodified'], - 'etag' => '"' . $row['etag'] . '"', - 'size' => (int)$row['size'], + 'calendardata' => $row['calendardata'], + 'uri' => $row['uri'], + 'lastmodified' => $row['lastmodified'], + 'etag' => '"' . $row['etag'] . '"', + 'size' => (int)$row['size'], ]; } diff --git a/apps/dav/lib/CalDAV/Calendar.php b/apps/dav/lib/CalDAV/Calendar.php index ca8534a76b8..38598e30ce3 100644 --- a/apps/dav/lib/CalDAV/Calendar.php +++ b/apps/dav/lib/CalDAV/Calendar.php @@ -191,10 +191,10 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable { if ($this->getOwner() !== parent::getOwner()) { $acl[] = [ - 'privilege' => '{DAV:}read', - 'principal' => parent::getOwner(), - 'protected' => true, - ]; + 'privilege' => '{DAV:}read', + 'principal' => parent::getOwner(), + 'protected' => true, + ]; if ($this->canWrite()) { $acl[] = [ 'privilege' => '{DAV:}write', diff --git a/apps/dav/lib/CardDAV/AddressBook.php b/apps/dav/lib/CardDAV/AddressBook.php index 56aa328be3e..4fc97ac401f 100644 --- a/apps/dav/lib/CardDAV/AddressBook.php +++ b/apps/dav/lib/CardDAV/AddressBook.php @@ -130,10 +130,10 @@ class AddressBook extends \Sabre\CardDAV\AddressBook implements IShareable { if ($this->getOwner() !== parent::getOwner()) { $acl[] = [ - 'privilege' => '{DAV:}read', - 'principal' => parent::getOwner(), - 'protected' => true, - ]; + 'privilege' => '{DAV:}read', + 'principal' => parent::getOwner(), + 'protected' => true, + ]; if ($this->canWrite()) { $acl[] = [ 'privilege' => '{DAV:}write', diff --git a/apps/dav/lib/CardDAV/AddressBookImpl.php b/apps/dav/lib/CardDAV/AddressBookImpl.php index 7ced2e90561..fd1cd8827aa 100644 --- a/apps/dav/lib/CardDAV/AddressBookImpl.php +++ b/apps/dav/lib/CardDAV/AddressBookImpl.php @@ -284,7 +284,7 @@ class AddressBookImpl implements IAddressBook { $result[$property->name][] = [ 'type' => $type, 'value' => $property->getValue() - ]; + ]; } else { $result[$property->name][] = $property->getValue(); } diff --git a/apps/dav/lib/CardDAV/CardDavBackend.php b/apps/dav/lib/CardDAV/CardDavBackend.php index 8925fcdbd0c..ee9f723be6b 100644 --- a/apps/dav/lib/CardDAV/CardDavBackend.php +++ b/apps/dav/lib/CardDAV/CardDavBackend.php @@ -76,8 +76,8 @@ class CardDavBackend implements BackendInterface, SyncSupport { /** @var array properties to index */ public static $indexProperties = [ - 'BDAY', 'UID', 'N', 'FN', 'TITLE', 'ROLE', 'NOTE', 'NICKNAME', - 'ORG', 'CATEGORIES', 'EMAIL', 'TEL', 'IMPP', 'ADR', 'URL', 'GEO', 'CLOUD']; + 'BDAY', 'UID', 'N', 'FN', 'TITLE', 'ROLE', 'NOTE', 'NICKNAME', + 'ORG', 'CATEGORIES', 'EMAIL', 'TEL', 'IMPP', 'ADR', 'URL', 'GEO', 'CLOUD']; /** * @var string[] Map of uid => display name diff --git a/apps/dav/lib/CardDAV/SyncService.php b/apps/dav/lib/CardDAV/SyncService.php index 53067978749..2180911b55c 100644 --- a/apps/dav/lib/CardDAV/SyncService.php +++ b/apps/dav/lib/CardDAV/SyncService.php @@ -202,7 +202,7 @@ class SyncService { $body = $this->buildSyncCollectionRequestBody($syncToken); $response = $client->request('REPORT', $addressBookUrl, $body, [ - 'Content-Type' => 'application/xml' + 'Content-Type' => 'application/xml' ]); return $this->parseMultiStatus($response['body']); diff --git a/apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php b/apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php index 2812eba9797..7f1a735c7a4 100644 --- a/apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php +++ b/apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php @@ -134,8 +134,8 @@ class FakeLockerPlugin extends ServerPlugin { $lockInfo->timeout = 1800; $body = $this->server->xml->write('{DAV:}prop', [ - '{DAV:}lockdiscovery' => - new LockDiscovery([$lockInfo]) + '{DAV:}lockdiscovery' => + new LockDiscovery([$lockInfo]) ]); $response->setStatus(200); diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php index 82f3c3b6ccd..8f94ea9a52e 100644 --- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/FilesPlugin.php @@ -209,7 +209,7 @@ class FilesPlugin extends ServerPlugin { $sourceNodeFileInfo = $sourceNode->getFileInfo(); if ($sourceNodeFileInfo === null) { throw new NotFound($source . ' does not exist'); - } + } if (!$sourceNodeFileInfo->isDeletable()) { throw new Forbidden($source . " cannot be deleted"); diff --git a/apps/dav/lib/Connector/Sabre/Principal.php b/apps/dav/lib/Connector/Sabre/Principal.php index 4b068dafda2..2fa01c0315d 100644 --- a/apps/dav/lib/Connector/Sabre/Principal.php +++ b/apps/dav/lib/Connector/Sabre/Principal.php @@ -446,9 +446,9 @@ class Principal implements BackendInterface { $userId = $user->getUID(); $displayName = $user->getDisplayName(); $principal = [ - 'uri' => $this->principalPrefix . '/' . $userId, - '{DAV:}displayname' => is_null($displayName) ? $userId : $displayName, - '{urn:ietf:params:xml:ns:caldav}calendar-user-type' => 'INDIVIDUAL', + 'uri' => $this->principalPrefix . '/' . $userId, + '{DAV:}displayname' => is_null($displayName) ? $userId : $displayName, + '{urn:ietf:params:xml:ns:caldav}calendar-user-type' => 'INDIVIDUAL', ]; $email = $user->getEMailAddress(); diff --git a/apps/dav/lib/Connector/Sabre/ServerFactory.php b/apps/dav/lib/Connector/Sabre/ServerFactory.php index 7f5bc6baea7..f740284f271 100644 --- a/apps/dav/lib/Connector/Sabre/ServerFactory.php +++ b/apps/dav/lib/Connector/Sabre/ServerFactory.php @@ -129,9 +129,9 @@ class ServerFactory { // Some WebDAV clients do require Class 2 WebDAV support (locking), since // we do not provide locking we emulate it using a fake locking plugin. if($this->request->isUserAgent([ - '/WebDAVFS/', - '/OneNote/', - '/Microsoft-WebDAV-MiniRedir/', + '/WebDAVFS/', + '/OneNote/', + '/Microsoft-WebDAV-MiniRedir/', ])) { $server->addPlugin(new \OCA\DAV\Connector\Sabre\FakeLockerPlugin()); } diff --git a/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php b/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php index c1a4337b36b..b95c978cf1a 100644 --- a/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php +++ b/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php @@ -29,59 +29,59 @@ use Sabre\Xml\XmlDeserializable; class ShareRequest implements XmlDeserializable { - public $set = []; + public $set = []; - public $remove = []; + public $remove = []; - /** - * Constructor - * - * @param array $set - * @param array $remove - */ - function __construct(array $set, array $remove) { + /** + * Constructor + * + * @param array $set + * @param array $remove + */ + function __construct(array $set, array $remove) { - $this->set = $set; - $this->remove = $remove; + $this->set = $set; + $this->remove = $remove; - } + } - static function xmlDeserialize(Reader $reader) { + static function xmlDeserialize(Reader $reader) { - $elements = $reader->parseInnerTree([ - '{' . Plugin::NS_OWNCLOUD. '}set' => 'Sabre\\Xml\\Element\\KeyValue', - '{' . Plugin::NS_OWNCLOUD . '}remove' => 'Sabre\\Xml\\Element\\KeyValue', - ]); + $elements = $reader->parseInnerTree([ + '{' . Plugin::NS_OWNCLOUD. '}set' => 'Sabre\\Xml\\Element\\KeyValue', + '{' . Plugin::NS_OWNCLOUD . '}remove' => 'Sabre\\Xml\\Element\\KeyValue', + ]); - $set = []; - $remove = []; + $set = []; + $remove = []; - foreach ($elements as $elem) { - switch ($elem['name']) { + foreach ($elements as $elem) { + switch ($elem['name']) { - case '{' . Plugin::NS_OWNCLOUD . '}set' : - $sharee = $elem['value']; + case '{' . Plugin::NS_OWNCLOUD . '}set' : + $sharee = $elem['value']; - $sumElem = '{' . Plugin::NS_OWNCLOUD . '}summary'; - $commonName = '{' . Plugin::NS_OWNCLOUD . '}common-name'; + $sumElem = '{' . Plugin::NS_OWNCLOUD . '}summary'; + $commonName = '{' . Plugin::NS_OWNCLOUD . '}common-name'; - $set[] = [ - 'href' => $sharee['{DAV:}href'], - 'commonName' => isset($sharee[$commonName]) ? $sharee[$commonName] : null, - 'summary' => isset($sharee[$sumElem]) ? $sharee[$sumElem] : null, - 'readOnly' => !array_key_exists('{' . Plugin::NS_OWNCLOUD . '}read-write', $sharee), - ]; - break; + $set[] = [ + 'href' => $sharee['{DAV:}href'], + 'commonName' => isset($sharee[$commonName]) ? $sharee[$commonName] : null, + 'summary' => isset($sharee[$sumElem]) ? $sharee[$sumElem] : null, + 'readOnly' => !array_key_exists('{' . Plugin::NS_OWNCLOUD . '}read-write', $sharee), + ]; + break; - case '{' . Plugin::NS_OWNCLOUD . '}remove' : - $remove[] = $elem['value']['{DAV:}href']; - break; + case '{' . Plugin::NS_OWNCLOUD . '}remove' : + $remove[] = $elem['value']['{DAV:}href']; + break; - } - } + } + } - return new self($set, $remove); + return new self($set, $remove); - } + } } diff --git a/apps/dav/lib/RootCollection.php b/apps/dav/lib/RootCollection.php index 271b7f6c866..e50c2a882ca 100644 --- a/apps/dav/lib/RootCollection.php +++ b/apps/dav/lib/RootCollection.php @@ -148,30 +148,30 @@ class RootCollection extends SimpleCollection { \OC::$server->query(ITimeFactory::class)); $children = [ - new SimpleCollection('principals', [ - $userPrincipals, - $groupPrincipals, - $systemPrincipals, - $calendarResourcePrincipals, - $calendarRoomPrincipals]), - $filesCollection, - $userCalendarRoot, - new SimpleCollection('system-calendars', [ - $resourceCalendarRoot, - $roomCalendarRoot, - ]), - $publicCalendarRoot, - new SimpleCollection('addressbooks', [ - $usersAddressBookRoot, - $systemAddressBookRoot]), - $systemTagCollection, - $systemTagRelationsCollection, - $commentsCollection, - $uploadCollection, - $avatarCollection, - new SimpleCollection('provisioning', [ - $appleProvisioning - ]) + new SimpleCollection('principals', [ + $userPrincipals, + $groupPrincipals, + $systemPrincipals, + $calendarResourcePrincipals, + $calendarRoomPrincipals]), + $filesCollection, + $userCalendarRoot, + new SimpleCollection('system-calendars', [ + $resourceCalendarRoot, + $roomCalendarRoot, + ]), + $publicCalendarRoot, + new SimpleCollection('addressbooks', [ + $usersAddressBookRoot, + $systemAddressBookRoot]), + $systemTagCollection, + $systemTagRelationsCollection, + $commentsCollection, + $uploadCollection, + $avatarCollection, + new SimpleCollection('provisioning', [ + $appleProvisioning + ]) ]; parent::__construct('root', $children); 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 ] |