We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 864264a commit 129dfaeCopy full SHA for 129dfae
tests/XmlConstructTest.php
@@ -215,6 +215,27 @@ public function testCustomIndentString3()
215
$this->assertEquals($expected, $out);
216
}
217
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
239
/**
240
* @since 1.3.0
241
*/
0 commit comments