ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
SupportedAddressDataTest.php
Go to the documentation of this file.
1<?php
2
4
6use Sabre\DAV;
7
9
10 function testSimple() {
11
12 $property = new SupportedAddressData();
13 $this->assertInstanceOf('Sabre\CardDAV\Xml\Property\SupportedAddressData', $property);
14
15 }
16
20 function testSerialize() {
21
22 $property = new SupportedAddressData();
23
24 $this->namespaceMap[CardDAV\Plugin::NS_CARDDAV] = 'card';
25 $xml = $this->write(['{DAV:}root' => $property]);
26
27 $this->assertXmlStringEqualsXmlString(
28'<?xml version="1.0"?>
29<d:root xmlns:card="' . CardDAV\Plugin::NS_CARDDAV . '" xmlns:d="DAV:">' .
30'<card:address-data-type content-type="text/vcard" version="3.0"/>' .
31'<card:address-data-type content-type="text/vcard" version="4.0"/>' .
32'<card:address-data-type content-type="application/vcard+json" version="4.0"/>' .
33'</d:root>
34', $xml);
35
36 }
37
38}
An exception for terminatinating execution or to throw for unit testing.
const NS_CARDDAV
xml namespace for CardDAV elements
Definition: Plugin.php:33