Skip to content

Commit 129dfae

Browse files
committed
added some tests
1 parent 864264a commit 129dfae

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tests/XmlConstructTest.php

+21
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,27 @@ public function testCustomIndentString3()
215215
$this->assertEquals($expected, $out);
216216
}
217217

218+
/**
219+
* @since 2.0.1
220+
*/
221+
public function testCustomIndentString4()
222+
{
223+
$expected = <<<XML
224+
<?xml version="1.0" encoding="UTF-8"?>
225+
<root>
226+
<tag1 attr1="val1" attr2="val2"/>
227+
<tag2>content2</tag2>
228+
<tag3>
229+
<tag4>content4</tag4>
230+
</tag3>
231+
</root>
232+
233+
XML;
234+
$xml = new XmlConstructor(['indentString' => '']);
235+
$out = $xml->fromArray($this->in1)->toOutput();
236+
$this->assertEquals($expected, $out);
237+
}
238+
218239
/**
219240
* @since 1.3.0
220241
*/

0 commit comments

Comments
 (0)