mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-27 03:52:50 +00:00
35 lines
672 B
PHP
35 lines
672 B
PHP
<?php
|
|
|
|
namespace Sabre\DAVACL\Property;
|
|
|
|
use Sabre\DAV;
|
|
use Sabre\HTTP;
|
|
|
|
class ACLRestrictionsTest extends \PHPUnit_Framework_TestCase {
|
|
|
|
function testConstruct() {
|
|
|
|
$prop = new AclRestrictions();
|
|
|
|
}
|
|
|
|
function testSerializeEmpty() {
|
|
|
|
$dom = new \DOMDocument('1.0');
|
|
$root = $dom->createElementNS('DAV:','d:root');
|
|
|
|
$dom->appendChild($root);
|
|
|
|
$acl = new AclRestrictions();
|
|
$acl->serialize(new DAV\Server(), $root);
|
|
|
|
$xml = $dom->saveXML();
|
|
$expected = '<?xml version="1.0"?>
|
|
<d:root xmlns:d="DAV:"><d:grant-only/><d:no-invert/></d:root>
|
|
';
|
|
$this->assertEquals($expected, $xml);
|
|
|
|
}
|
|
|
|
|
|
}
|