diff options
author | Mario <mario@mariovavti.com> | 2019-11-10 12:49:51 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2019-11-10 14:10:03 +0100 |
commit | 580c3f4ffe9608d2beb56d418c68b3b112420e76 (patch) | |
tree | 82335d01179ac361d3f547a4b8e8c598d302e9f3 /vendor/sabre/dav/tests/Sabre/CalDAV/SharedCalendarTest.php | |
parent | d22766f458a8539a40a57f3946459a9be1f21cd6 (diff) | |
download | volse-hubzilla-580c3f4ffe9608d2beb56d418c68b3b112420e76.tar.gz volse-hubzilla-580c3f4ffe9608d2beb56d418c68b3b112420e76.tar.bz2 volse-hubzilla-580c3f4ffe9608d2beb56d418c68b3b112420e76.zip |
another bulk of composer updates
(cherry picked from commit 6685381fd8db507493c3d7c1793f8c05c681bbce)
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/CalDAV/SharedCalendarTest.php')
-rw-r--r-- | vendor/sabre/dav/tests/Sabre/CalDAV/SharedCalendarTest.php | 56 |
1 files changed, 26 insertions, 30 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/SharedCalendarTest.php b/vendor/sabre/dav/tests/Sabre/CalDAV/SharedCalendarTest.php index f71c19523..735bbef41 100644 --- a/vendor/sabre/dav/tests/Sabre/CalDAV/SharedCalendarTest.php +++ b/vendor/sabre/dav/tests/Sabre/CalDAV/SharedCalendarTest.php @@ -1,24 +1,26 @@ <?php +declare(strict_types=1); + namespace Sabre\CalDAV; use Sabre\DAV\Sharing; use Sabre\DAV\Xml\Element\Sharee; -class SharedCalendarTest extends \PHPUnit_Framework_TestCase { - +class SharedCalendarTest extends \PHPUnit\Framework\TestCase +{ protected $backend; - function getInstance(array $props = null) { - + public function getInstance(array $props = null) + { if (is_null($props)) { $props = [ - 'id' => 1, + 'id' => 1, '{http://calendarserver.org/ns/}shared-url' => 'calendars/owner/original', - '{http://sabredav.org/ns}owner-principal' => 'principals/owner', - '{http://sabredav.org/ns}read-only' => false, - 'share-access' => Sharing\Plugin::ACCESS_READWRITE, - 'principaluri' => 'principals/sharee', + '{http://sabredav.org/ns}owner-principal' => 'principals/owner', + '{http://sabredav.org/ns}read-only' => false, + 'share-access' => Sharing\Plugin::ACCESS_READWRITE, + 'principaluri' => 'principals/sharee', ]; } @@ -35,11 +37,10 @@ class SharedCalendarTest extends \PHPUnit_Framework_TestCase { $this->backend->updateInvites(1, [$sharee]); return new SharedCalendar($this->backend, $props); - } - function testGetInvites() { - + public function testGetInvites() + { $sharee = new Sharee(); $sharee->href = 'mailto:removeme@example.org'; $sharee->properties['{DAV:}displayname'] = 'To be removed'; @@ -50,15 +51,15 @@ class SharedCalendarTest extends \PHPUnit_Framework_TestCase { [$sharee], $this->getInstance()->getInvites() ); - } - function testGetOwner() { + public function testGetOwner() + { $this->assertEquals('principals/sharee', $this->getInstance()->getOwner()); } - function testGetACL() { - + public function testGetACL() + { $expected = [ [ 'privilege' => '{DAV:}write', @@ -96,18 +97,17 @@ class SharedCalendarTest extends \PHPUnit_Framework_TestCase { 'protected' => true, ], [ - 'privilege' => '{' . Plugin::NS_CALDAV . '}read-free-busy', + 'privilege' => '{'.Plugin::NS_CALDAV.'}read-free-busy', 'principal' => '{DAV:}authenticated', 'protected' => true, ], ]; $this->assertEquals($expected, $this->getInstance()->getACL()); - } - function testGetChildACL() { - + public function testGetChildACL() + { $expected = [ [ 'privilege' => '{DAV:}write', @@ -134,19 +134,17 @@ class SharedCalendarTest extends \PHPUnit_Framework_TestCase { 'principal' => 'principals/sharee/calendar-proxy-read', 'protected' => true, ], - ]; $this->assertEquals($expected, $this->getInstance()->getChildACL()); - } - function testUpdateInvites() { - + public function testUpdateInvites() + { $instance = $this->getInstance(); $newSharees = [ new Sharee(), - new Sharee() + new Sharee(), ]; $newSharees[0]->href = 'mailto:test@example.org'; $newSharees[0]->properties['{DAV:}displayname'] = 'Foo Bar'; @@ -159,18 +157,16 @@ class SharedCalendarTest extends \PHPUnit_Framework_TestCase { $instance->updateInvites($newSharees); $expected = [ - clone $newSharees[0] + clone $newSharees[0], ]; $expected[0]->inviteStatus = Sharing\Plugin::INVITE_NORESPONSE; $this->assertEquals($expected, $instance->getInvites()); - } - function testPublish() { - + public function testPublish() + { $instance = $this->getInstance(); $this->assertNull($instance->setPublishStatus(true)); $this->assertNull($instance->setPublishStatus(false)); - } } |