ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
PropFindTest.php
Go to the documentation of this file.
1<?php
2
4
6
7class 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
An exception for terminatinating execution or to throw for unit testing.
WebDAV PROPFIND request parser.
Definition: PropFind.php:20
parse($xml, array $elementMap=[])
Definition: XmlTest.php:26