Skip to content

Commit 0e749e7

Browse files
committed
Small tweaks.
1 parent 933852c commit 0e749e7

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

lib/Service.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,7 @@ function getWriter() {
7676
*
7777
* The $rootElementName is specified by reference and will be populated
7878
* with the root element name of the document.
79-
*
80-
* If a non-null value was set to $rootElementName when calling this
81-
* function, the parse function will compare it to the actual root element
82-
* name and throw an exception if they didn't match.
83-
*
84-
* This is useful in cases where you expected a specific document to be
85-
* passed, and reduces the amount of if statements.
86-
*
79+
8780
* @param string|resource $input
8881
* @param string|null $contextUri
8982
* @param string|null $rootElementName

tests/Sabre/XML/WriterTest.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,22 @@ function testSimple() {
3434
<?xml version="1.0"?>
3535
<s:root xmlns:s="http://sabredav.org/ns">text</s:root>
3636
37+
HI
38+
);
39+
40+
}
41+
42+
/**
43+
* @depends testSimple
44+
*/
45+
function testSimpleQuotes() {
46+
47+
$this->compare([
48+
'{http://sabredav.org/ns}root' => '"text"',
49+
], <<<HI
50+
<?xml version="1.0"?>
51+
<s:root xmlns:s="http://sabredav.org/ns">&quot;text&quot;</s:root>
52+
3753
HI
3854
);
3955

0 commit comments

Comments
 (0)