ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
InfiteLoopTest.php
Go to the documentation of this file.
1
<?
php
2
3
namespace
Sabre\Xml
;
4
5
class
InfiteLoopTest
extends
\PHPUnit_Framework_TestCase
{
6
11
function
testDeserialize
() {
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
}
49
50
}
Sabre\VObject\$output
$output
Definition:
mergeduplicates.php:36
$reader
$reader
Definition:
scanCallStructure.php:5
Sabre\Xml\InfiteLoopTest
Definition:
InfiteLoopTest.php:5
Sabre\Xml
Definition:
ContextStackTrait.php:3
PHPUnit_Framework_TestCase
Sabre\Xml\Reader
The Reader class expands upon PHP's built-in XMLReader.
Definition:
Reader.php:20
php
Sabre\Xml\InfiteLoopTest\testDeserialize
testDeserialize()
This particular xml body caused the parser to go into an infinite loop.
Definition:
InfiteLoopTest.php:11
libs
composer
vendor
sabre
xml
tests
Sabre
Xml
InfiteLoopTest.php
Generated on Thu Jan 16 2025 19:01:54 for ILIAS by
1.8.13 (using
Doxyfile
)