'{DAV:}all',
));
}
/**
* @depends testSimple
*/
function testSerializeSimple() {
$prop = new Sabre_DAVACL_Property_SupportedPrivilegeSet(array(
'privilege' => '{DAV:}all',
));
$doc = new DOMDocument();
$root = $doc->createElementNS('DAV:', 'd:supported-privilege-set');
$doc->appendChild($root);
$server = new Sabre_DAV_Server();
$prop->serialize($server, $root);
$xml = $doc->saveXML();
$this->assertEquals(
'
' .
'' .
'' .
'' .
'' .
'' .
'
', $xml);
}
/**
* @depends testSimple
*/
function testSerializeAggregate() {
$prop = new Sabre_DAVACL_Property_SupportedPrivilegeSet(array(
'privilege' => '{DAV:}all',
'abstract' => true,
'aggregates' => array(
array(
'privilege' => '{DAV:}read',
),
array(
'privilege' => '{DAV:}write',
'description' => 'booh',
),
),
));
$doc = new DOMDocument();
$root = $doc->createElementNS('DAV:', 'd:supported-privilege-set');
$doc->appendChild($root);
$server = new Sabre_DAV_Server();
$prop->serialize($server, $root);
$xml = $doc->saveXML();
$this->assertEquals(
'
' .
'' .
'' .
'' .
'' .
'' .
'' .
'' .
'' .
'' .
'' .
'' .
'' .
'' .
'' .
'booh' .
'' .
'' .
'
', $xml);
}
}