blob: a0e4130d5503438b5364bae7a692bd3e81e29d3f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
<?php
namespace Sabre\CardDAV\Property;
use Sabre\CardDAV;
use Sabre\DAV;
class SupportedAddressDataDataTest extends \PHPUnit_Framework_TestCase {
function testSimple() {
$property = new SupportedAddressData();
}
/**
* @depends testSimple
*/
function testSerialize() {
$property = new SupportedAddressData();
$doc = new \DOMDocument();
$root = $doc->createElementNS(CardDAV\Plugin::NS_CARDDAV, 'card:root');
$root->setAttribute('xmlns:d','DAV:');
$doc->appendChild($root);
$server = new DAV\Server();
$property->serialize($server, $root);
$xml = $doc->saveXML();
$this->assertEquals(
'<?xml version="1.0"?>
<card:root xmlns:card="' . CardDAV\Plugin::NS_CARDDAV . '" xmlns:d="DAV:">' .
'<card:address-data-type content-type="text/vcard" version="3.0"/>' .
//'<card:address-data-type content-type="text/vcard" version="4.0"/>' .
'</card:root>
', $xml);
}
}
|