'{DAV:}all',
]);
$this->assertInstanceOf('Sabre\DAVACL\Xml\Property\SupportedPrivilegeSet', $prop);
}
/**
* @depends testSimple
*/
function testSerializeSimple() {
$prop = new SupportedPrivilegeSet([
'privilege' => '{DAV:}all',
]);
$xml = (new DAV\Server())->xml->write('{DAV:}supported-privilege-set', $prop);
$this->assertXmlStringEqualsXmlString('
', $xml);
}
/**
* @depends testSimple
*/
function testSerializeAggregate() {
$prop = new SupportedPrivilegeSet([
'privilege' => '{DAV:}all',
'abstract' => true,
'aggregates' => [
[
'privilege' => '{DAV:}read',
],
[
'privilege' => '{DAV:}write',
'description' => 'booh',
],
],
]);
$xml = (new DAV\Server())->xml->write('{DAV:}supported-privilege-set', $prop);
$this->assertXmlStringEqualsXmlString('
booh
', $xml);
}
function testToHtml() {
$prop = new SupportedPrivilegeSet([
'privilege' => '{DAV:}all',
'abstract' => true,
'aggregates' => [
[
'privilege' => '{DAV:}read',
],
[
'privilege' => '{DAV:}write',
'description' => 'booh',
],
],
]);
$html = new HtmlOutputHelper(
'/base/',
['DAV:' => 'd']
);
$expected = <<
d:all (abstract)
HTML;
$this->assertEquals($expected, $prop->toHtml($html));
}
}