aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/tests/Sabre/CalDAV/Notifications
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-03-08 09:31:23 +0000
committerMario <mario@mariovavti.com>2021-03-08 09:31:23 +0000
commit951e9c8c4f39dd8577834d5bc501c05d80722de9 (patch)
tree6a42c6a229c7b2b3e13bc5af77a733d054242695 /vendor/sabre/dav/tests/Sabre/CalDAV/Notifications
parentf94b046333c57acde493ee5dc2511acc6baca701 (diff)
parent89415e17313578eb115c441480b6e0ddfa90afef (diff)
downloadvolse-hubzilla-5.4.tar.gz
volse-hubzilla-5.4.tar.bz2
volse-hubzilla-5.4.zip
Merge branch '5.4RC'5.4
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/CalDAV/Notifications')
-rw-r--r--vendor/sabre/dav/tests/Sabre/CalDAV/Notifications/CollectionTest.php78
-rw-r--r--vendor/sabre/dav/tests/Sabre/CalDAV/Notifications/NodeTest.php88
2 files changed, 0 insertions, 166 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/Notifications/CollectionTest.php b/vendor/sabre/dav/tests/Sabre/CalDAV/Notifications/CollectionTest.php
deleted file mode 100644
index 594241e0d..000000000
--- a/vendor/sabre/dav/tests/Sabre/CalDAV/Notifications/CollectionTest.php
+++ /dev/null
@@ -1,78 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Sabre\CalDAV\Notifications;
-
-use Sabre\CalDAV;
-
-class CollectionTest extends \PHPUnit\Framework\TestCase
-{
- protected $caldavBackend;
- protected $principalUri;
- protected $notification;
-
- public function getInstance()
- {
- $this->principalUri = 'principals/user1';
-
- $this->notification = new CalDAV\Xml\Notification\SystemStatus(1, '"1"');
-
- $this->caldavBackend = new CalDAV\Backend\MockSharing([], [], [
- 'principals/user1' => [
- $this->notification,
- ],
- ]);
-
- return new Collection($this->caldavBackend, $this->principalUri);
- }
-
- public function testGetChildren()
- {
- $col = $this->getInstance();
- $this->assertEquals('notifications', $col->getName());
-
- $this->assertEquals([
- new Node($this->caldavBackend, $this->principalUri, $this->notification),
- ], $col->getChildren());
- }
-
- public function testGetOwner()
- {
- $col = $this->getInstance();
- $this->assertEquals('principals/user1', $col->getOwner());
- }
-
- public function testGetGroup()
- {
- $col = $this->getInstance();
- $this->assertNull($col->getGroup());
- }
-
- public function testGetACL()
- {
- $col = $this->getInstance();
- $expected = [
- [
- 'privilege' => '{DAV:}all',
- 'principal' => '{DAV:}owner',
- 'protected' => true,
- ],
- ];
-
- $this->assertEquals($expected, $col->getACL());
- }
-
- public function testSetACL()
- {
- $this->expectException('Sabre\DAV\Exception\Forbidden');
- $col = $this->getInstance();
- $col->setACL([]);
- }
-
- public function testGetSupportedPrivilegeSet()
- {
- $col = $this->getInstance();
- $this->assertNull($col->getSupportedPrivilegeSet());
- }
-}
diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/Notifications/NodeTest.php b/vendor/sabre/dav/tests/Sabre/CalDAV/Notifications/NodeTest.php
deleted file mode 100644
index 623525e69..000000000
--- a/vendor/sabre/dav/tests/Sabre/CalDAV/Notifications/NodeTest.php
+++ /dev/null
@@ -1,88 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Sabre\CalDAV\Notifications;
-
-use Sabre\CalDAV;
-
-class NodeTest extends \PHPUnit\Framework\TestCase
-{
- protected $systemStatus;
- protected $caldavBackend;
-
- public function getInstance()
- {
- $principalUri = 'principals/user1';
-
- $this->systemStatus = new CalDAV\Xml\Notification\SystemStatus(1, '"1"');
-
- $this->caldavBackend = new CalDAV\Backend\MockSharing([], [], [
- 'principals/user1' => [
- $this->systemStatus,
- ],
- ]);
-
- $node = new Node($this->caldavBackend, 'principals/user1', $this->systemStatus);
-
- return $node;
- }
-
- public function testGetId()
- {
- $node = $this->getInstance();
- $this->assertEquals($this->systemStatus->getId().'.xml', $node->getName());
- }
-
- public function testGetEtag()
- {
- $node = $this->getInstance();
- $this->assertEquals('"1"', $node->getETag());
- }
-
- public function testGetNotificationType()
- {
- $node = $this->getInstance();
- $this->assertEquals($this->systemStatus, $node->getNotificationType());
- }
-
- public function testDelete()
- {
- $node = $this->getInstance();
- $node->delete();
- $this->assertEquals([], $this->caldavBackend->getNotificationsForPrincipal('principals/user1'));
- }
-
- public function testGetGroup()
- {
- $node = $this->getInstance();
- $this->assertNull($node->getGroup());
- }
-
- public function testGetACL()
- {
- $node = $this->getInstance();
- $expected = [
- [
- 'privilege' => '{DAV:}all',
- 'principal' => '{DAV:}owner',
- 'protected' => true,
- ],
- ];
-
- $this->assertEquals($expected, $node->getACL());
- }
-
- public function testSetACL()
- {
- $this->expectException('Sabre\DAV\Exception\Forbidden');
- $node = $this->getInstance();
- $node->setACL([]);
- }
-
- public function testGetSupportedPrivilegeSet()
- {
- $node = $this->getInstance();
- $this->assertNull($node->getSupportedPrivilegeSet());
- }
-}