public function testCalendarOperations() { $calendarId = $this->createTestCalendar(); // update it's display name $patch = new PropPatch(['{DAV:}displayname' => 'Unit test', '{urn:ietf:params:xml:ns:caldav}calendar-description' => 'Calendar used for unit testing']); $this->backend->updateCalendar($calendarId, $patch); $patch->commit(); $books = $this->backend->getCalendarsForUser(self::UNIT_TEST_USER); $this->assertEquals(1, count($books)); $this->assertEquals('Unit test', $books[0]['{DAV:}displayname']); $this->assertEquals('Calendar used for unit testing', $books[0]['{urn:ietf:params:xml:ns:caldav}calendar-description']); // delete the address book $this->backend->deleteCalendar($books[0]['id']); $books = $this->backend->getCalendarsForUser(self::UNIT_TEST_USER); $this->assertEquals(0, count($books)); }