ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
EnumTest.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Sabre\Xml\Serializer;
4 
6 
8 
9  function testSerialize() {
10 
11  $service = new Service();
12  $service->namespaceMap['urn:test'] = null;
13 
14  $xml = $service->write('{urn:test}root', function($writer) {
15  enum($writer, [
16  '{urn:test}foo1',
17  '{urn:test}foo2',
18  ]);
19  });
20 
21  $expected = <<<XML
22 <?xml version="1.0"?>
23 <root xmlns="urn:test">
24  <foo1/>
25  <foo2/>
26 </root>
27 XML;
28 
29 
30  $this->assertXmlStringEqualsXmlString($expected, $xml);
31 
32 
33  }
34 
35 
36 }
XML parsing and writing service.
Definition: Service.php:16