Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F1820867
InfiteLoopTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Size
1 KB
Subscribers
None
InfiteLoopTest.php
View Options
<?php
namespace
Sabre\Xml
;
class
InfiteLoopTest
extends
\PHPUnit_Framework_TestCase
{
/**
* This particular xml body caused the parser to go into an infinite loop.
* Need to know why.
*/
function
testDeserialize
()
{
$body
=
'<?xml version="1.0"?>
<d:propertyupdate xmlns:d="DAV:" xmlns:s="http://sabredav.org/NS/test">
<d:set><d:prop></d:prop></d:set>
<d:set><d:prop></d:prop></d:set>
</d:propertyupdate>'
;
$reader
=
new
Reader
();
$reader
->
elementMap
=
[
'{DAV:}set'
=>
'Sabre
\\
Xml
\\
Element
\\
KeyValue'
,
];
$reader
->
xml
(
$body
);
$output
=
$reader
->
parse
();
$this
->
assertEquals
([
'name'
=>
'{DAV:}propertyupdate'
,
'value'
=>
[
[
'name'
=>
'{DAV:}set'
,
'value'
=>
[
'{DAV:}prop'
=>
null
,
],
'attributes'
=>
[],
],
[
'name'
=>
'{DAV:}set'
,
'value'
=>
[
'{DAV:}prop'
=>
null
,
],
'attributes'
=>
[],
],
],
'attributes'
=>
[],
],
$output
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Dec 22, 7:17 PM (3 d, 1 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
916810
Default Alt Text
InfiteLoopTest.php (1 KB)
Attached To
rDAVCAL DokuWiki DAVCal PlugIn
Event Timeline
Log In to Comment