diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-01-26 12:06:02 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-03 17:18:22 +0100 |
commit | 91065956080b02407625cd78796064e45a6d0236 (patch) | |
tree | 14d462ae2062ad6bc8e257167c36c0d04dd68c48 /apps/dav/tests | |
parent | dfeb6ea49117654842157f66798ecea6367a7626 (diff) | |
download | nextcloud-server-91065956080b02407625cd78796064e45a6d0236.tar.gz nextcloud-server-91065956080b02407625cd78796064e45a6d0236.zip |
Add calendar sharing
Diffstat (limited to 'apps/dav/tests')
12 files changed, 204 insertions, 98 deletions
diff --git a/apps/dav/tests/travis/caldav/install.sh b/apps/dav/tests/travis/caldav/install.sh index e836e37f86f..9688ec660de 100644 --- a/apps/dav/tests/travis/caldav/install.sh +++ b/apps/dav/tests/travis/caldav/install.sh @@ -15,6 +15,7 @@ fi cd "$SCRIPTPATH/../../../../../" OC_PASS=user01 php occ user:add --password-from-env user01 php occ dav:create-calendar user01 calendar +php occ dav:create-calendar user01 shared OC_PASS=user02 php occ user:add --password-from-env user02 php occ dav:create-calendar user02 calendar cd "$SCRIPTPATH/../../../../../" diff --git a/apps/dav/tests/travis/caldav/script.sh b/apps/dav/tests/travis/caldav/script.sh index fe3391d5a06..7259372567c 100644 --- a/apps/dav/tests/travis/caldav/script.sh +++ b/apps/dav/tests/travis/caldav/script.sh @@ -11,8 +11,8 @@ sleep 30 cd "$SCRIPTPATH/CalDAVTester" PYTHONPATH="$SCRIPTPATH/pycalendar/src" python testcaldav.py --print-details-onfail --basedir "$SCRIPTPATH/../caldavtest/" -o cdt.txt \ "CalDAV/current-user-principal.xml" \ - "CalDAV/sync-report.xml" - + "CalDAV/sync-report.xml" \ + "CalDAV/sharing-calendars.xml" RESULT=$? diff --git a/apps/dav/tests/travis/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/1.xml b/apps/dav/tests/travis/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/1.xml new file mode 100644 index 00000000000..3bcf9dc47f9 --- /dev/null +++ b/apps/dav/tests/travis/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/1.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8" ?> +<CS:share xmlns:D="DAV:" xmlns:CS="http://owncloud.org/ns"> + <CS:set> + <D:href>principal:principals/users/user02</D:href> + <CS:summary>My Shared Calendar</CS:summary> + <CS:read-write/> + </CS:set> +</CS:share> diff --git a/apps/dav/tests/travis/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/4.xml b/apps/dav/tests/travis/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/4.xml new file mode 100644 index 00000000000..fd0f248bb31 --- /dev/null +++ b/apps/dav/tests/travis/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/4.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8" ?> +<D:propfind xmlns:D="DAV:"> +<D:prop> +<D:resourcetype/> +<D:owner/> +<D:current-user-privilege-set/> +</D:prop> +</D:propfind> diff --git a/apps/dav/tests/travis/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/5.ics b/apps/dav/tests/travis/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/5.ics new file mode 100644 index 00000000000..ae21adac8b2 --- /dev/null +++ b/apps/dav/tests/travis/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/5.ics @@ -0,0 +1,29 @@ +BEGIN:VCALENDAR +VERSION:2.0 +PRODID:-//PYVOBJECT//NONSGML Version 1//EN +BEGIN:VTIMEZONE +TZID:US/Eastern +LAST-MODIFIED:20040110T032845Z +BEGIN:STANDARD +DTSTART:20001026T020000 +RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10 +TZNAME:EST +TZOFFSETFROM:-0400 +TZOFFSETTO:-0500 +END:STANDARD +BEGIN:DAYLIGHT +DTSTART:20000404T020000 +RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4 +TZNAME:EDT +TZOFFSETFROM:-0500 +TZOFFSETTO:-0400 +END:DAYLIGHT +END:VTIMEZONE +BEGIN:VEVENT +UID:$uid1: +DTSTART;TZID=US/Eastern:$now.year.1:0101T100000 +DURATION:PT1H +DTSTAMP:20051222T205953Z +SUMMARY:event 1 +END:VEVENT +END:VCALENDAR diff --git a/apps/dav/tests/travis/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/5.xml b/apps/dav/tests/travis/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/5.xml new file mode 100644 index 00000000000..e52a842ff66 --- /dev/null +++ b/apps/dav/tests/travis/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/5.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8" ?> +<D:propfind xmlns:D="DAV:" xmlns:CS="http://calendarserver.org/ns/"> +<D:prop> +<CS:invite/> +</D:prop> +</D:propfind> diff --git a/apps/dav/tests/travis/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/6.ics b/apps/dav/tests/travis/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/6.ics new file mode 100644 index 00000000000..145f5f14c7b --- /dev/null +++ b/apps/dav/tests/travis/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/6.ics @@ -0,0 +1,29 @@ +BEGIN:VCALENDAR +VERSION:2.0 +PRODID:-//PYVOBJECT//NONSGML Version 1//EN +BEGIN:VTIMEZONE +TZID:US/Eastern +LAST-MODIFIED:20040110T032845Z +BEGIN:STANDARD +DTSTART:20001026T020000 +RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10 +TZNAME:EST +TZOFFSETFROM:-0400 +TZOFFSETTO:-0500 +END:STANDARD +BEGIN:DAYLIGHT +DTSTART:20000404T020000 +RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4 +TZNAME:EDT +TZOFFSETFROM:-0500 +TZOFFSETTO:-0400 +END:DAYLIGHT +END:VTIMEZONE +BEGIN:VEVENT +UID:$uid1: +DTSTART;TZID=US/Eastern:$now.year.1:0101T100000 +DURATION:PT4H +DTSTAMP:20051222T205953Z +SUMMARY:event 4 +END:VEVENT +END:VCALENDAR diff --git a/apps/dav/tests/travis/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/7.ics b/apps/dav/tests/travis/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/7.ics new file mode 100644 index 00000000000..c4e816210df --- /dev/null +++ b/apps/dav/tests/travis/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/7.ics @@ -0,0 +1,29 @@ +BEGIN:VCALENDAR +VERSION:2.0 +PRODID:-//PYVOBJECT//NONSGML Version 1//EN +BEGIN:VTIMEZONE +TZID:US/Eastern +LAST-MODIFIED:20040110T032845Z +BEGIN:STANDARD +DTSTART:20001026T020000 +RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10 +TZNAME:EST +TZOFFSETFROM:-0400 +TZOFFSETTO:-0500 +END:STANDARD +BEGIN:DAYLIGHT +DTSTART:20000404T020000 +RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4 +TZNAME:EDT +TZOFFSETFROM:-0500 +TZOFFSETTO:-0400 +END:DAYLIGHT +END:VTIMEZONE +BEGIN:VEVENT +UID:$uid2: +DTSTART;TZID=US/Eastern:$now.year.1:0201T100000 +DURATION:PT1H +DTSTAMP:20051222T205953Z +SUMMARY:event 7 +END:VEVENT +END:VCALENDAR diff --git a/apps/dav/tests/travis/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/8.ics b/apps/dav/tests/travis/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/8.ics new file mode 100644 index 00000000000..2da72d2f601 --- /dev/null +++ b/apps/dav/tests/travis/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/8.ics @@ -0,0 +1,29 @@ +BEGIN:VCALENDAR +VERSION:2.0 +PRODID:-//PYVOBJECT//NONSGML Version 1//EN +BEGIN:VTIMEZONE +TZID:US/Eastern +LAST-MODIFIED:20040110T032845Z +BEGIN:STANDARD +DTSTART:20001026T020000 +RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10 +TZNAME:EST +TZOFFSETFROM:-0400 +TZOFFSETTO:-0500 +END:STANDARD +BEGIN:DAYLIGHT +DTSTART:20000404T020000 +RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4 +TZNAME:EDT +TZOFFSETFROM:-0500 +TZOFFSETTO:-0400 +END:DAYLIGHT +END:VTIMEZONE +BEGIN:VEVENT +UID:$uid2: +DTSTART;TZID=US/Eastern:$now.year.1:0201T100000 +DURATION:PT7H +DTSTAMP:20051222T205953Z +SUMMARY:event 7-1 +END:VEVENT +END:VCALENDAR diff --git a/apps/dav/tests/travis/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/9.ics b/apps/dav/tests/travis/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/9.ics new file mode 100644 index 00000000000..dfc21bb9c5b --- /dev/null +++ b/apps/dav/tests/travis/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/9.ics @@ -0,0 +1,29 @@ +BEGIN:VCALENDAR +VERSION:2.0 +PRODID:-//PYVOBJECT//NONSGML Version 1//EN +BEGIN:VTIMEZONE +TZID:US/Eastern +LAST-MODIFIED:20040110T032845Z +BEGIN:STANDARD +DTSTART:20001026T020000 +RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10 +TZNAME:EST +TZOFFSETFROM:-0400 +TZOFFSETTO:-0500 +END:STANDARD +BEGIN:DAYLIGHT +DTSTART:20000404T020000 +RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4 +TZNAME:EDT +TZOFFSETFROM:-0500 +TZOFFSETTO:-0400 +END:DAYLIGHT +END:VTIMEZONE +BEGIN:VEVENT +UID:$uid3: +DTSTART;TZID=US/Eastern:$now.year.1:0201T100000 +DURATION:PT7H +DTSTAMP:20051222T205953Z +SUMMARY:event 9.ics +END:VEVENT +END:VCALENDAR diff --git a/apps/dav/tests/travis/caldavtest/tests/CalDAV/sharing-calendars.xml b/apps/dav/tests/travis/caldavtest/tests/CalDAV/sharing-calendars.xml index fa20a6e4862..2204ca3af69 100644 --- a/apps/dav/tests/travis/caldavtest/tests/CalDAV/sharing-calendars.xml +++ b/apps/dav/tests/travis/caldavtest/tests/CalDAV/sharing-calendars.xml @@ -27,6 +27,7 @@ </require-feature> <start> + <!-- <request user="$userid1:" pswd="$pswd1:"> <method>DELETEALL</method> <ruri>$notificationpath1:/</ruri> @@ -50,6 +51,7 @@ <filepath>Resource/Common/PROPPATCH/calendar-transp-opaque.xml</filepath> </data> </request> + --> </start> <test-suite name='Read-write calendar'> @@ -67,56 +69,11 @@ </verify> </request> </test> - <test name='2'> - <description>Check Sharee notification collection</description> - <request user="$userid2:" pswd="$pswd2:"> - <method>WAITCOUNT 1</method> - <ruri>$notificationpath2:/</ruri> - </request> - <request user="$userid2:" pswd="$pswd2:"> - <method>GETNEW</method> - <ruri>$notificationpath2:/</ruri> - <verify> - <callback>xmlDataMatch</callback> - <arg> - <name>filepath</name> - <value>Resource/CalDAV/sharing/calendars/read-write/2.xml</value> - </arg> - <arg> - <name>filter</name> - <value>{http://calendarserver.org/ns/}dtstamp</value> - <value>{http://calendarserver.org/ns/}uid</value> - </arg> - </verify> - <grabelement> - <name>{http://calendarserver.org/ns/}invite-notification/{http://calendarserver.org/ns/}uid</name> - <variable>$inviteuid:</variable> - </grabelement> - </request> - </test> - <test name='3'> - <description>Sharee replies ACCEPTED</description> - <request user="$userid2:" pswd="$pswd2:"> - <method>POST</method> - <ruri>$calendarhome2:/</ruri> - <data> - <content-type>application/xml; charset=utf-8</content-type> - <filepath>Resource/CalDAV/sharing/calendars/read-write/3.xml</filepath> - </data> - <verify> - <callback>statusCode</callback> - </verify> - <grabelement> - <name>{DAV:}href</name> - <variable>$sharedcalendar:</variable> - </grabelement> - </request> - </test> <test name='4'> <description>Shared calendar exists</description> <request user="$userid2:" pswd="$pswd2:"> <method>PROPFIND</method> - <ruri>$sharedcalendar:/</ruri> + <ruri>$calendarhome1:/shared/</ruri> <header> <name>Depth</name> <value>0</value> @@ -132,12 +89,12 @@ <value>$verify-property-prefix:/{DAV:}owner/{DAV:}href[=$principaluri1:]</value> <value>$verify-property-prefix:/{DAV:}resourcetype/{DAV:}collection</value> <value>$verify-property-prefix:/{DAV:}resourcetype/{urn:ietf:params:xml:ns:caldav}calendar</value> - <value>$verify-property-prefix:/{DAV:}resourcetype/{http://calendarserver.org/ns/}shared</value> + <!-- value>$verify-property-prefix:/{DAV:}resourcetype/{http://calendarserver.org/ns/}shared</value --> <value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}read</value> <value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}write</value> <value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}bind</value> <value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}unbind</value> - <value>$verify-property-prefix:/{urn:ietf:params:xml:ns:caldav}schedule-calendar-transp/{urn:ietf:params:xml:ns:caldav}transparent</value> + <!-- value>$verify-property-prefix:/{urn:ietf:params:xml:ns:caldav}schedule-calendar-transp/{urn:ietf:params:xml:ns:caldav}transparent</value --> </arg> <arg> <name>notexists</name> @@ -151,7 +108,7 @@ <description>Shared calendar exists Depth:1</description> <request user="$userid2:" pswd="$pswd2:"> <method>PROPFIND</method> - <ruri>$calendarhome2:/</ruri> + <ruri>$calendarhome2:</ruri> <header> <name>Depth</name> <value>1</value> @@ -164,19 +121,19 @@ <callback>xmlElementMatch</callback> <arg> <name>parent</name> - <value>$multistatus-response-prefix:[^{DAV:}href=$sharedcalendar:/]</value> + <value>$multistatus-response-prefix:[^{DAV:}href=$calendarhome2:/shared_shared_by_user01/]</value> </arg> <arg> <name>exists</name> <value>$verify-response-prefix:/{DAV:}owner/{DAV:}href[=$principaluri1:]</value> <value>$verify-response-prefix:/{DAV:}resourcetype/{DAV:}collection</value> <value>$verify-response-prefix:/{DAV:}resourcetype/{urn:ietf:params:xml:ns:caldav}calendar</value> - <value>$verify-response-prefix:/{DAV:}resourcetype/{http://calendarserver.org/ns/}shared</value> + <!-- value>$verify-response-prefix:/{DAV:}resourcetype/{http://calendarserver.org/ns/}shared</value --> <value>$verify-response-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}read</value> <value>$verify-response-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}write</value> <value>$verify-response-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}bind</value> <value>$verify-response-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}unbind</value> - <value>$verify-response-prefix:/{urn:ietf:params:xml:ns:caldav}schedule-calendar-transp/{urn:ietf:params:xml:ns:caldav}transparent</value> + <!-- value>$verify-response-prefix:/{urn:ietf:params:xml:ns:caldav}schedule-calendar-transp/{urn:ietf:params:xml:ns:caldav}transparent</value --> </arg> <arg> <name>notexists</name> @@ -186,42 +143,6 @@ </verify> </request> </test> - <test name='4b'> - <description>Shared calendar has invite property</description> - <request user="$userid2:" pswd="$pswd2:"> - <method>PROPFIND</method> - <ruri>$sharedcalendar:/</ruri> - <header> - <name>Depth</name> - <value>0</value> - </header> - <data> - <content-type>text/xml; charset=utf-8</content-type> - <filepath>Resource/CalDAV/sharing/calendars/read-write/5.xml</filepath> - </data> - <verify> - <callback>propfindItems</callback> - <arg> - <name>okprops</name> - <value>{http://calendarserver.org/ns/}invite</value> - </arg> - </verify> - <verify> - <callback>xmlElementMatch</callback> - <arg> - <name>exists</name> - <value>$verify-property-prefix:/{http://calendarserver.org/ns/}invite</value> - <value>$verify-property-prefix:/{http://calendarserver.org/ns/}invite/{http://calendarserver.org/ns/}organizer</value> - <value>$verify-property-prefix:/{http://calendarserver.org/ns/}invite/{http://calendarserver.org/ns/}organizer/{DAV:}href[=$principaluri1:]</value> - <value>$verify-property-prefix:/{http://calendarserver.org/ns/}invite/{http://calendarserver.org/ns/}organizer/{http://calendarserver.org/ns/}common-name[=$username1:]</value> - <value>$verify-property-prefix:/{http://calendarserver.org/ns/}invite/{http://calendarserver.org/ns/}user</value> - <value>$verify-property-prefix:/{http://calendarserver.org/ns/}invite/{http://calendarserver.org/ns/}user/{DAV:}href[=$cuaddrurn2:]</value> - <value>$verify-property-prefix:/{http://calendarserver.org/ns/}invite/{http://calendarserver.org/ns/}user/{http://calendarserver.org/ns/}access/{http://calendarserver.org/ns/}read-write</value> - <value>$verify-property-prefix:/{http://calendarserver.org/ns/}invite/{http://calendarserver.org/ns/}user/{http://calendarserver.org/ns/}invite-accepted</value> - </arg> - </verify> - </request> - </test> <test name='5'> <description>Original calendar unchanged</description> <request> @@ -240,7 +161,7 @@ <arg> <name>exists</name> <value>$verify-property-prefix:/{DAV:}owner/{DAV:}href[=$principaluri1:]</value> - <value>$verify-property-prefix:/{urn:ietf:params:xml:ns:caldav}schedule-calendar-transp/{urn:ietf:params:xml:ns:caldav}opaque</value> + <!-- value>$verify-property-prefix:/{urn:ietf:params:xml:ns:caldav}schedule-calendar-transp/{urn:ietf:params:xml:ns:caldav}opaque</value --> </arg> </verify> </request> @@ -249,7 +170,7 @@ <description>Sharee creates event</description> <request user="$userid2:" pswd="$pswd2:"> <method>PUT</method> - <ruri>$sharedcalendar:/1.ics</ruri> + <ruri>$calendarhome1:/shared/1.ics</ruri> <data> <content-type>text/calendar; charset=utf-8</content-type> <filepath>Resource/CalDAV/sharing/calendars/read-write/5.ics</filepath> @@ -291,7 +212,7 @@ <description>Sharee sees changed event</description> <request user="$userid2:" pswd="$pswd2:"> <method>GET</method> - <ruri>$sharedcalendar:/1.ics</ruri> + <ruri>$calendarhome1:/shared/1.ics</ruri> <verify> <callback>calendarDataMatch</callback> <arg> @@ -319,7 +240,7 @@ <description>Sharee sees new event</description> <request user="$userid2:" pswd="$pswd2:"> <method>GET</method> - <ruri>$sharedcalendar:/2.ics</ruri> + <ruri>$calendarhome1:/shared/2.ics</ruri> <verify> <callback>calendarDataMatch</callback> <arg> @@ -333,7 +254,7 @@ <description>Sharee changes event</description> <request user="$userid2:" pswd="$pswd2:"> <method>PUT</method> - <ruri>$sharedcalendar:/2.ics</ruri> + <ruri>$calendarhome1:/shared/2.ics</ruri> <data> <content-type>text/calendar; charset=utf-8</content-type> <filepath>Resource/CalDAV/sharing/calendars/read-write/8.ics</filepath> @@ -358,7 +279,8 @@ </request> </test> </test-suite> - + + <!-- <test-suite name='Default calendar cannot be shared calendar'> <test name='1'> <description>Set property on Inbox</description> @@ -560,7 +482,10 @@ </test> </test-suite> +--> + <end> + <!-- <request user="$useradmin:" pswd="$pswdadmin:"> <method>DELETEALL</method> <ruri>$notificationpath1:/</ruri> @@ -568,6 +493,7 @@ <ruri>$notificationpath3:/</ruri> <ruri>$notificationpath4:/</ruri> </request> + --> </end> </caldavtest> diff --git a/apps/dav/tests/unit/caldav/caldavbackendtest.php b/apps/dav/tests/unit/caldav/caldavbackendtest.php index 939fd36fba8..a4869f18289 100644 --- a/apps/dav/tests/unit/caldav/caldavbackendtest.php +++ b/apps/dav/tests/unit/caldav/caldavbackendtest.php @@ -23,6 +23,7 @@ namespace Tests\Connector\Sabre; use DateTime; use DateTimeZone; use OCA\DAV\CalDAV\CalDavBackend; +use OCA\DAV\Connector\Sabre\Principal; use Sabre\CalDAV\Xml\Property\SupportedCalendarComponentSet; use Sabre\DAV\PropPatch; use Sabre\DAV\Xml\Property\Href; @@ -40,14 +41,25 @@ class CalDavBackendTest extends TestCase { /** @var CalDavBackend */ private $backend; - const UNIT_TEST_USER = 'caldav-unit-test'; + /** @var Principal | \PHPUnit_Framework_MockObject_MockObject */ + private $principal; + const UNIT_TEST_USER = 'caldav-unit-test'; public function setUp() { parent::setUp(); + $this->principal = $this->getMockBuilder('OCA\DAV\Connector\Sabre\Principal') + ->disableOriginalConstructor() + ->setMethods(['getPrincipalByPath']) + ->getMock(); + $this->principal->method('getPrincipalByPath') + ->willReturn([ + 'uri' => 'principals/best-friend' + ]); + $db = \OC::$server->getDatabaseConnection(); - $this->backend = new CalDavBackend($db); + $this->backend = new CalDavBackend($db, $this->principal); $this->tearDown(); } |