aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/tests/Sabre/CalDAV/Principal/UserTest.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-02-15 18:35:40 +0000
committerMario <mario@mariovavti.com>2021-02-15 18:35:40 +0000
commit0cd4c3410121b9b584dc1b108e555832843b2576 (patch)
treeadcac187c383120a255396d19a010f359c58e614 /vendor/sabre/dav/tests/Sabre/CalDAV/Principal/UserTest.php
parent02401ea9fd5d53f590305c0f9834685cda58723d (diff)
downloadvolse-hubzilla-0cd4c3410121b9b584dc1b108e555832843b2576.tar.gz
volse-hubzilla-0cd4c3410121b9b584dc1b108e555832843b2576.tar.bz2
volse-hubzilla-0cd4c3410121b9b584dc1b108e555832843b2576.zip
compser update sabre/dav /vobject
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/CalDAV/Principal/UserTest.php')
-rw-r--r--vendor/sabre/dav/tests/Sabre/CalDAV/Principal/UserTest.php111
1 files changed, 0 insertions, 111 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/Principal/UserTest.php b/vendor/sabre/dav/tests/Sabre/CalDAV/Principal/UserTest.php
deleted file mode 100644
index fd079acb2..000000000
--- a/vendor/sabre/dav/tests/Sabre/CalDAV/Principal/UserTest.php
+++ /dev/null
@@ -1,111 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Sabre\CalDAV\Principal;
-
-use Sabre\DAVACL;
-
-class UserTest extends \PHPUnit\Framework\TestCase
-{
- public function getInstance()
- {
- $backend = new DAVACL\PrincipalBackend\Mock();
- $backend->addPrincipal([
- 'uri' => 'principals/user/calendar-proxy-read',
- ]);
- $backend->addPrincipal([
- 'uri' => 'principals/user/calendar-proxy-write',
- ]);
- $backend->addPrincipal([
- 'uri' => 'principals/user/random',
- ]);
-
- return new User($backend, [
- 'uri' => 'principals/user',
- ]);
- }
-
- public function testCreateFile()
- {
- $this->expectException('Sabre\DAV\Exception\Forbidden');
- $u = $this->getInstance();
- $u->createFile('test');
- }
-
- public function testCreateDirectory()
- {
- $this->expectException('Sabre\DAV\Exception\Forbidden');
- $u = $this->getInstance();
- $u->createDirectory('test');
- }
-
- public function testGetChildProxyRead()
- {
- $u = $this->getInstance();
- $child = $u->getChild('calendar-proxy-read');
- $this->assertInstanceOf('Sabre\\CalDAV\\Principal\\ProxyRead', $child);
- }
-
- public function testGetChildProxyWrite()
- {
- $u = $this->getInstance();
- $child = $u->getChild('calendar-proxy-write');
- $this->assertInstanceOf('Sabre\\CalDAV\\Principal\\ProxyWrite', $child);
- }
-
- public function testGetChildNotFound()
- {
- $this->expectException('Sabre\DAV\Exception\NotFound');
- $u = $this->getInstance();
- $child = $u->getChild('foo');
- }
-
- public function testGetChildNotFound2()
- {
- $this->expectException('Sabre\DAV\Exception\NotFound');
- $u = $this->getInstance();
- $child = $u->getChild('random');
- }
-
- public function testGetChildren()
- {
- $u = $this->getInstance();
- $children = $u->getChildren();
- $this->assertEquals(2, count($children));
- $this->assertInstanceOf('Sabre\\CalDAV\\Principal\\ProxyRead', $children[0]);
- $this->assertInstanceOf('Sabre\\CalDAV\\Principal\\ProxyWrite', $children[1]);
- }
-
- public function testChildExist()
- {
- $u = $this->getInstance();
- $this->assertTrue($u->childExists('calendar-proxy-read'));
- $this->assertTrue($u->childExists('calendar-proxy-write'));
- $this->assertFalse($u->childExists('foo'));
- }
-
- public function testGetACL()
- {
- $expected = [
- [
- 'privilege' => '{DAV:}all',
- 'principal' => '{DAV:}owner',
- 'protected' => true,
- ],
- [
- 'privilege' => '{DAV:}read',
- 'principal' => 'principals/user/calendar-proxy-read',
- 'protected' => true,
- ],
- [
- 'privilege' => '{DAV:}read',
- 'principal' => 'principals/user/calendar-proxy-write',
- 'protected' => true,
- ],
- ];
-
- $u = $this->getInstance();
- $this->assertEquals($expected, $u->getACL());
- }
-}