Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F1821008
XmlTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Size
857 B
Subscribers
None
XmlTest.php
View Options
<?php
namespace
Sabre\DAV\Xml
;
use
Sabre\Xml\Writer
;
use
Sabre\Xml\Reader
;
abstract
class
XmlTest
extends
\PHPUnit_Framework_TestCase
{
protected
$elementMap
=
[];
protected
$namespaceMap
=
[
'DAV:'
=>
'd'
];
protected
$contextUri
=
'/'
;
function
write
(
$input
)
{
$writer
=
new
Writer
();
$writer
->
contextUri
=
$this
->
contextUri
;
$writer
->
namespaceMap
=
$this
->
namespaceMap
;
$writer
->
openMemory
();
$writer
->
setIndent
(
true
);
$writer
->
write
(
$input
);
return
$writer
->
outputMemory
();
}
function
parse
(
$xml
,
array
$elementMap
=
[])
{
$reader
=
new
Reader
();
$reader
->
elementMap
=
array_merge
(
$this
->
elementMap
,
$elementMap
);
$reader
->
xml
(
$xml
);
return
$reader
->
parse
();
}
function
cleanUp
()
{
libxml_clear_errors
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Dec 23, 12:56 AM (1 d, 17 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
914315
Default Alt Text
XmlTest.php (857 B)
Attached To
rDAVCAL DokuWiki DAVCal PlugIn
Event Timeline
Log In to Comment