ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\Xml\InfiteLoopTest Class Reference
+ Inheritance diagram for Sabre\Xml\InfiteLoopTest:
+ Collaboration diagram for Sabre\Xml\InfiteLoopTest:

Public Member Functions

 testDeserialize ()
 This particular xml body caused the parser to go into an infinite loop. More...
 

Detailed Description

Definition at line 5 of file InfiteLoopTest.php.

Member Function Documentation

◆ testDeserialize()

Sabre\Xml\InfiteLoopTest::testDeserialize ( )

This particular xml body caused the parser to go into an infinite loop.

Need to know why.

Definition at line 11 of file InfiteLoopTest.php.

11 {
12
13 $body = '<?xml version="1.0"?>
14<d:propertyupdate xmlns:d="DAV:" xmlns:s="http://sabredav.org/NS/test">
15 <d:set><d:prop></d:prop></d:set>
16 <d:set><d:prop></d:prop></d:set>
17</d:propertyupdate>';
18
19 $reader = new Reader();
20 $reader->elementMap = [
21 '{DAV:}set' => 'Sabre\\Xml\\Element\\KeyValue',
22 ];
23 $reader->xml($body);
24
25 $output = $reader->parse();
26
27 $this->assertEquals([
28 'name' => '{DAV:}propertyupdate',
29 'value' => [
30 [
31 'name' => '{DAV:}set',
32 'value' => [
33 '{DAV:}prop' => null,
34 ],
35 'attributes' => [],
36 ],
37 [
38 'name' => '{DAV:}set',
39 'value' => [
40 '{DAV:}prop' => null,
41 ],
42 'attributes' => [],
43 ],
44 ],
45 'attributes' => [],
46 ], $output);
47
48 }

References Sabre\VObject\$output, and $reader.


The documentation for this class was generated from the following file: