11 $this->assertEquals(
'{' .
Plugin::NS_CARDDAV .
'}addressbook', $this->server->resourceTypeMapping[
'Sabre\\CardDAV\\IAddressBook']);
13 $this->assertTrue(in_array(
'addressbook', $this->plugin->getFeatures()));
14 $this->assertEquals(
'carddav', $this->plugin->getPluginInfo()[
'name']);
23 ], $this->plugin->getSupportedReportSet(
'addressbooks/user1/book1'));
30 ], $this->plugin->getSupportedReportSet(
''));
38 $this->assertEquals(1, count(
$result));
40 $this->assertEquals(
'addressbooks/user1/',
$result[
'{' . Plugin::NS_CARDDAV .
'}addressbook-home-set']->getHref());
48 $this->assertEquals(1, count(
$result));
50 $this->assertEquals([
'directory'],
$result[
'{' . Plugin::NS_CARDDAV .
'}directory-gateway']->getHrefs());
56 $this->assertNull($this->plugin->report(
'{DAV:}foo',
new \DomDocument(),
''));
63 $r = $this->server->emit(
'onHTMLActionsPanel', [$this->server->tree->getNodeForPath(
'addressbooks/user1'), &
$output]);
64 $this->assertFalse(
$r);
66 $this->assertTrue(!!strpos(
$output,
'Display name'));
73 $propFind =
new DAV\PropFind(
'addressbooks/user1/book1', [
74 $ns .
'supported-address-data',
75 $ns .
'supported-collation-set',
77 $node = $this->server->tree->getNodeForPath(
'addressbooks/user1/book1');
78 $this->plugin->propFindEarly($propFind, $node);
80 $this->assertInstanceOf(
81 'Sabre\\CardDAV\\Xml\\Property\\SupportedAddressData',
82 $propFind->get($ns .
'supported-address-data')
84 $this->assertInstanceOf(
85 'Sabre\\CardDAV\\Xml\\Property\\SupportedCollationSet',
86 $propFind->get($ns .
'supported-collation-set')
94 $request = new \Sabre\HTTP\Request(
'GET',
'/addressbooks/user1/book1/card1', [
'Accept: application/vcard+json']);
95 $response = new \Sabre\HTTP\ResponseMock();
98 $this->assertEquals(200,
$response->getStatus());
testAddressbookPluginProperties()
foreach($paths as $path) $request
const NS_CARDDAV
xml namespace for CardDAV elements
This class holds all the information about a PROPFIND request.
testSupportedReportSetEmpty()