ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
EmailAddressSetTest.php
Go to the documentation of this file.
1<?php
2
4
6
8
9 protected $namespaceMap = [
11 'DAV:' => 'd',
12 ];
13
14 function testSimple() {
15
16 $eas = new EmailAddressSet(['foo@example.org']);
17 $this->assertEquals(['foo@example.org'], $eas->getValue());
18
19 }
20
24 function testSerialize() {
25
26 $property = new EmailAddressSet(['foo@example.org']);
27
28 $xml = $this->write([
29 '{DAV:}root' => $property
30 ]);
31
32 $this->assertXmlStringEqualsXmlString(
33'<?xml version="1.0"?>
34<d:root xmlns:d="DAV:" xmlns:cs="' . \Sabre\CalDAV\Plugin::NS_CALENDARSERVER . '">
35<cs:email-address>foo@example.org</cs:email-address>
36</d:root>', $xml);
37
38 }
39
40}
An exception for terminatinating execution or to throw for unit testing.
const NS_CALENDARSERVER
This is the namespace for the proprietary calendarserver extensions.
Definition: Plugin.php:38