Blame view

sources/3rdparty/sabre/dav/tests/Sabre/DAVACL/Property/ACLRestrictionsTest.php 672 Bytes
6d9380f96   Cédric Dupont   Update sources OC...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
  <?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);
  
      }
  
  
  }