mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-09 09:58:49 +00:00
Initial Release of the calendar plugin
This commit is contained in:
parent
45cc9885fc
commit
7115197a33
561 changed files with 189494 additions and 0 deletions
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
|
||||
class Sabre_CardDAV_Property_SupportedAddressDataDataTest extends PHPUnit_Framework_TestCase {
|
||||
|
||||
function testSimple() {
|
||||
|
||||
$property = new Sabre_CardDAV_Property_SupportedAddressData();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @depends testSimple
|
||||
*/
|
||||
function testSerialize() {
|
||||
|
||||
$property = new Sabre_CardDAV_Property_SupportedAddressData();
|
||||
|
||||
$doc = new DOMDocument();
|
||||
$root = $doc->createElementNS(Sabre_CardDAV_Plugin::NS_CARDDAV, 'card:root');
|
||||
$root->setAttribute('xmlns:d','DAV:');
|
||||
|
||||
$doc->appendChild($root);
|
||||
$server = new Sabre_DAV_Server();
|
||||
|
||||
$property->serialize($server, $root);
|
||||
|
||||
$xml = $doc->saveXML();
|
||||
|
||||
$this->assertEquals(
|
||||
'<?xml version="1.0"?>
|
||||
<card:root xmlns:card="' . Sabre_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);
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue