From 66effbfe0827fc61fff6d248797a894213ad20d6 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sat, 28 May 2016 17:46:24 +0200 Subject: upgrade to sabre32 --- .../dav/tests/Sabre/CalDAV/Schedule/OutboxTest.php | 73 +++++----------------- 1 file changed, 16 insertions(+), 57 deletions(-) (limited to 'vendor/sabre/dav/tests/Sabre/CalDAV/Schedule') diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/Schedule/OutboxTest.php b/vendor/sabre/dav/tests/Sabre/CalDAV/Schedule/OutboxTest.php index 933c7157b..04d4b1237 100644 --- a/vendor/sabre/dav/tests/Sabre/CalDAV/Schedule/OutboxTest.php +++ b/vendor/sabre/dav/tests/Sabre/CalDAV/Schedule/OutboxTest.php @@ -1,6 +1,7 @@ assertEquals('outbox', $outbox->getName()); - $this->assertEquals(array(), $outbox->getChildren()); + $this->assertEquals([], $outbox->getChildren()); $this->assertEquals('principals/user1', $outbox->getOwner()); $this->assertEquals(null, $outbox->getGroup()); - $this->assertEquals(array( - array( - 'privilege' => '{' . CalDAV\Plugin::NS_CALDAV . '}schedule-query-freebusy', - 'principal' => 'principals/user1', - 'protected' => true, - ), - - array( - 'privilege' => '{' . CalDAV\Plugin::NS_CALDAV . '}schedule-post-vevent', + $this->assertEquals([ + [ + 'privilege' => '{' . CalDAV\Plugin::NS_CALDAV . '}schedule-send', 'principal' => 'principals/user1', 'protected' => true, - ), - array( + ], + [ 'privilege' => '{DAV:}read', 'principal' => 'principals/user1', 'protected' => true, - ), - array( - 'privilege' => '{' . CalDAV\Plugin::NS_CALDAV . '}schedule-query-freebusy', + ], + [ + 'privilege' => '{' . CalDAV\Plugin::NS_CALDAV . '}schedule-send', 'principal' => 'principals/user1/calendar-proxy-write', 'protected' => true, - ), - array( - 'privilege' => '{' . CalDAV\Plugin::NS_CALDAV . '}schedule-post-vevent', - 'principal' => 'principals/user1/calendar-proxy-write', - 'protected' => true, - ), - array( + ], + [ 'privilege' => '{DAV:}read', 'principal' => 'principals/user1/calendar-proxy-read', 'protected' => true, - ), - array( + ], + [ 'privilege' => '{DAV:}read', 'principal' => 'principals/user1/calendar-proxy-write', 'protected' => true, - ), - ), $outbox->getACL()); - - $ok = false; - try { - $outbox->setACL(array()); - } catch (DAV\Exception\MethodNotAllowed $e) { - $ok = true; - } - if (!$ok) { - $this->fail('Exception was not emitted'); - } - - } - - function testGetSupportedPrivilegeSet() { - - $outbox = new Outbox('principals/user1'); - $r = $outbox->getSupportedPrivilegeSet(); - - $ok = 0; - foreach($r['aggregates'] as $priv) { - - if ($priv['privilege'] == '{' . CalDAV\Plugin::NS_CALDAV . '}schedule-query-freebusy') { - $ok++; - } - if ($priv['privilege'] == '{' . CalDAV\Plugin::NS_CALDAV . '}schedule-post-vevent') { - $ok++; - } - } - - $this->assertEquals(2, $ok, "We're missing one or more privileges"); + ], + ], $outbox->getACL()); } - } -- cgit v1.2.3