ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
PropFindTest.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Sabre\DAV\Xml\Request;
4 
6 
7 class PropFindTest extends XmlTest {
8 
9  function testDeserializeProp() {
10 
11  $xml = '<?xml version="1.0"?>
12 <d:root xmlns:d="DAV:">
13  <d:prop>
14  <d:hello />
15  </d:prop>
16 </d:root>
17 ';
18 
19  $result = $this->parse($xml, ['{DAV:}root' => 'Sabre\\DAV\\Xml\\Request\PropFind']);
20 
21  $propFind = new PropFind();
22  $propFind->properties = ['{DAV:}hello'];
23 
24  $this->assertEquals($propFind, $result['value']);
25 
26 
27  }
28 
30 
31  $xml = '<?xml version="1.0"?>
32 <d:root xmlns:d="DAV:">
33  <d:allprop />
34 </d:root>
35 ';
36 
37  $result = $this->parse($xml, ['{DAV:}root' => 'Sabre\\DAV\\Xml\\Request\PropFind']);
38 
39  $propFind = new PropFind();
40  $propFind->allProp = true;
41 
42  $this->assertEquals($propFind, $result['value']);
43 
44 
45  }
46 
47 
48 }
$result
parse($xml, array $elementMap=[])
Definition: XmlTest.php:26
WebDAV PROPFIND request parser.
Definition: PropFind.php:20