ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
EnumTest.php
Go to the documentation of this file.
1
<?
php
2
3
namespace
Sabre\Xml\Serializer
;
4
5
use
Sabre\Xml\Service
;
6
7
class
EnumTest
extends
\PHPUnit_Framework_TestCase
{
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
}
PHPUnit_Framework_TestCase
Sabre\Xml\Serializer\EnumTest
Definition:
EnumTest.php:7
Sabre\Xml\Service
XML parsing and writing service.
Definition:
Service.php:16
$xml
$xml
Definition:
fetch_windows_zones.php:11
Sabre\Xml\Serializer\EnumTest\testSerialize
testSerialize()
Definition:
EnumTest.php:9
php
Sabre\Xml\Serializer
Definition:
functions.php:3
Service
libs
composer
vendor
sabre
xml
tests
Sabre
Xml
Serializer
EnumTest.php
Generated on Thu Jan 16 2025 19:01:54 for ILIAS by
1.8.13 (using
Doxyfile
)