ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
SupportedCollationSetTest.php
Go to the documentation of this file.
1 <?php
2 
4 
5 use Sabre\CardDAV;
6 use Sabre\DAV;
7 
9 
10  function testSimple() {
11 
12  $property = new SupportedCollationSet();
13  $this->assertInstanceOf('Sabre\CardDAV\Xml\Property\SupportedCollationSet', $property);
14 
15  }
16 
20  function testSerialize() {
21 
22  $property = new SupportedCollationSet();
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:supported-collation>i;ascii-casemap</card:supported-collation>' .
31 '<card:supported-collation>i;octet</card:supported-collation>' .
32 '<card:supported-collation>i;unicode-casemap</card:supported-collation>' .
33 '</d:root>
34 ', $xml);
35 
36  }
37 
38 }
const NS_CARDDAV
xml namespace for CardDAV elements
Definition: Plugin.php:33