public function testSubscriptions() { $id = $this->backend->createSubscription(self::UNIT_TEST_USER, 'Subscription', ['{http://calendarserver.org/ns/}source' => new Href('test-source')]); $subscriptions = $this->backend->getSubscriptionsForUser(self::UNIT_TEST_USER); $this->assertEquals(1, count($subscriptions)); $this->assertEquals($id, $subscriptions[0]['id']); $patch = new PropPatch(['{DAV:}displayname' => 'Unit test']); $this->backend->updateSubscription($id, $patch); $patch->commit(); $subscriptions = $this->backend->getSubscriptionsForUser(self::UNIT_TEST_USER); $this->assertEquals(1, count($subscriptions)); $this->assertEquals($id, $subscriptions[0]['id']); $this->assertEquals('Unit test', $subscriptions[0]['{DAV:}displayname']); $this->backend->deleteSubscription($id); $subscriptions = $this->backend->getSubscriptionsForUser(self::UNIT_TEST_USER); $this->assertEquals(0, count($subscriptions)); }