Definition at line 7 of file RepeatingElementsTest.php.
◆ testRead()
Sabre\Xml\Deserializer\RepeatingElementsTest::testRead |
( |
| ) |
|
Definition at line 9 of file RepeatingElementsTest.php.
9 {
10
11 $service = new Service();
12 $service->elementMap[
'{urn:test}collection'] =
function(
$reader) {
14 };
15
17<?xml version="1.0"?>
18<collection xmlns="urn:test">
19 <item>foo</item>
20 <item>bar</item>
21</collection>
22XML;
23
25
26 $expected = [
27 'foo',
28 'bar',
29 ];
30
31 $this->assertEquals($expected,
$result);
32
33 }
repeatingElements(Reader $reader, $childElementName)
This deserializer helps you deserialize xml structures that look like this:
References $reader, $result, $xml, and Sabre\Xml\Deserializer\repeatingElements().
The documentation for this class was generated from the following file: