24 if (!SABRE_HASSQLITE) $this->markTestSkipped(
'SQLite driver is not available');
44 $this->inbox =
new Inbox($this->backend,
'principals/user1');
45 $this->inbox->createFile(
'item1.ics', $this->
data);
52 unset($this->backend);
58 $children = $this->inbox->getChildren();
61 $this->assertInternalType(
'string', $children[0]->getName());
62 $this->assertInternalType(
'string', $children[0]->
get());
63 $this->assertInternalType(
'string', $children[0]->getETag());
64 $this->assertEquals(
'text/calendar; charset=utf-8', $children[0]->getContentType());
100 $children = $this->inbox->getChildren();
103 $children[0]->put(
'');
112 $children = $this->inbox->getChildren();
118 $children2 = $this->inbox->getChildren();
119 $this->assertEquals(count($children) - 1, count($children2));
128 $children = $this->inbox->getChildren();
133 $lastMod = $obj->getLastModified();
134 $this->assertTrue(is_int($lastMod) || ctype_digit($lastMod) || is_null($lastMod));
143 $children = $this->inbox->getChildren();
148 $size = $obj->getSize();
149 $this->assertInternalType(
'int',
$size);
155 $children = $this->inbox->getChildren();
159 $this->assertEquals(
'principals/user1', $obj->getOwner());
165 $children = $this->inbox->getChildren();
169 $this->assertNull($obj->getGroup());
177 'privilege' =>
'{DAV:}all',
178 'principal' =>
'{DAV:}owner',
182 'privilege' =>
'{DAV:}all',
183 'principal' =>
'principals/user1/calendar-proxy-write',
187 'privilege' =>
'{DAV:}read',
188 'principal' =>
'principals/user1/calendar-proxy-read',
193 $children = $this->inbox->getChildren();
197 $this->assertEquals($expected, $obj->getACL());
204 $calendarObject =
new SchedulingObject(
$backend, [
'calendarid' => 1,
'uri' =>
'foo',
'principaluri' =>
'principals/user1']);
207 'privilege' =>
'{DAV:}all',
208 'principal' =>
'{DAV:}owner',
212 'privilege' =>
'{DAV:}all',
213 'principal' =>
'principals/user1/calendar-proxy-write',
217 'privilege' =>
'{DAV:}read',
218 'principal' =>
'principals/user1/calendar-proxy-read',
222 $this->assertEquals($expected, $calendarObject->getACL());
232 $children = $this->inbox->getChildren();
242 $children = $this->inbox->getChildren();
247 $this->assertEquals($this->
data, $obj->get());
254 $backend->createSchedulingObject(
'principals/user1',
'foo',
'foo');
259 'principaluri' =>
'principals/user1',
262 $this->assertEquals(
'foo', $obj->get());
269 'calendardata' =>
'foo',
278 $this->assertEquals(
'bar', $obj->getETag());
285 'calendardata' =>
'foo',
293 $this->assertEquals(
'"' . md5(
'foo') .
'"', $obj->getETag());
300 'calendardata' =>
'foo',
307 $this->assertNull($obj->getSupportedPrivilegeSet());
314 'calendardata' =>
'foo',
321 $this->assertEquals(3, $obj->getSize());
335 $this->assertEquals(4, $obj->getSize());
348 $this->assertEquals(
'text/calendar; charset=utf-8', $obj->getContentType());
357 'component' =>
'VEVENT',
362 $this->assertEquals(
'text/calendar; charset=utf-8; component=VEVENT', $obj->getContentType());
375 $this->assertEquals([], $obj->getACL());
The CalDAV scheduling inbox.
testGetLastModified()
testSetup
testInvalidArg2()
InvalidArgumentException
testInvalidArg1()
InvalidArgumentException
testGetSupportedPrivilegesSet()
The SchedulingObject represents a scheduling object in the Inbox collection.