Page MenuHomePhabricator

EmailAddressSetTest.php
No OneTemporary

EmailAddressSetTest.php

<?php
namespace Sabre\CalDAV\Xml\Property;
use Sabre\DAV\Xml\XmlTest;
class EmailAddressSetTest extends XmlTest {
protected $namespaceMap = [
\Sabre\CalDAV\Plugin::NS_CALENDARSERVER => 'cs',
'DAV:' => 'd',
];
function testSimple() {
$eas = new EmailAddressSet(['foo@example.org']);
$this->assertEquals(['foo@example.org'], $eas->getValue());
}
/**
* @depends testSimple
*/
function testSerialize() {
$property = new EmailAddressSet(['foo@example.org']);
$xml = $this->write([
'{DAV:}root' => $property
]);
$this->assertXmlStringEqualsXmlString(
'<?xml version="1.0"?>
<d:root xmlns:d="DAV:" xmlns:cs="' . \Sabre\CalDAV\Plugin::NS_CALENDARSERVER . '">
<cs:email-address>foo@example.org</cs:email-address>
</d:root>', $xml);
}
}

File Metadata

Mime Type
text/x-php
Expires
Sun, Dec 22, 10:13 AM (4 d, 9 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
914763
Default Alt Text
EmailAddressSetTest.php (854 B)

Event Timeline