File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -312,6 +312,29 @@ public function testDecodeArray()
312312 $ this ->assertEquals ($ expected , $ this ->encoder ->decode ($ source , 'xml ' ));
313313 }
314314
315+ public function testDecodeIgnoreWhiteSpace ()
316+ {
317+ $ source = <<<XML
318+ <?xml version="1.0"?>
319+ <people>
320+ <person>
321+ <firstname>Benjamin</firstname>
322+ <lastname>Alexandre</lastname>
323+ </person>
324+ <person>
325+ <firstname>Damien</firstname>
326+ <lastname>Clay</lastname>
327+ </person>
328+ </people>
329+ XML ;
330+ $ expected = array ('person ' => array (
331+ array ('firstname ' => 'Benjamin ' , 'lastname ' => 'Alexandre ' ),
332+ array ('firstname ' => 'Damien ' , 'lastname ' => 'Clay ' )
333+ ));
334+
335+ $ this ->assertEquals ($ expected , $ this ->encoder ->decode ($ source , 'xml ' ));
336+ }
337+
315338 public function testDecodeWithoutItemHash ()
316339 {
317340 $ obj = new ScalarDummy ();
You can’t perform that action at this time.
0 commit comments