3 class Sabre_CalDAV_Schedule_OutboxTest extends PHPUnit_Framework_TestCase {
7 $outbox = new Sabre_CalDAV_Schedule_Outbox('principals/user1');
8 $this->assertEquals('outbox', $outbox->getName());
9 $this->assertEquals(array(), $outbox->getChildren());
10 $this->assertEquals('principals/user1', $outbox->getOwner());
11 $this->assertEquals(null, $outbox->getGroup());
13 $this->assertEquals(array(
15 'privilege' => '{' . Sabre_CalDAV_Plugin::NS_CALDAV . '}schedule-query-freebusy',
16 'principal' => 'principals/user1',
20 'privilege' => '{DAV:}read',
21 'principal' => 'principals/user1',
24 ), $outbox->getACL());
28 $outbox->setACL(array());
29 } catch (Sabre_DAV_Exception_MethodNotAllowed $e) {
33 $this->fail('Exception was not emitted');
38 function testGetSupportedPrivilegeSet() {
40 $outbox = new Sabre_CalDAV_Schedule_Outbox('principals/user1');
41 $r = $outbox->getSupportedPrivilegeSet();
44 foreach($r['aggregates'] as $priv) {
46 if ($priv['privilege'] == '{' . Sabre_CalDAV_Plugin::NS_CALDAV . '}schedule-query-freebusy') {
52 $this->fail('{' . Sabre_CalDAV_Plugin::NS_CALDAV . '}schedule-query-freebusy was not found as a supported privilege');