1<?php
2
3namespace Sabre\DAVACL\Xml\Property;
4
5use Sabre\DAV;
6use Sabre\HTTP;
7
8class AclRestrictionsTest extends \PHPUnit_Framework_TestCase {
9
10    function testConstruct() {
11
12        $prop = new AclRestrictions();
13        $this->assertInstanceOf('Sabre\DAVACL\Xml\Property\AclRestrictions', $prop);
14
15    }
16
17    function testSerialize() {
18
19        $prop = new AclRestrictions();
20        $xml = (new DAV\Server())->xml->write('{DAV:}root', $prop);
21
22        $expected = '<?xml version="1.0"?>
23<d:root xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns"><d:grant-only/><d:no-invert/></d:root>';
24
25        $this->assertXmlStringEqualsXmlString($expected, $xml);
26
27    }
28
29
30}
31