|
@@ -65,7 +65,7 @@ class XmlEncoderTest extends \PHPUnit_Framework_TestCase
|
|
'Bar' => "Test",
|
|
'Bar' => "Test",
|
|
'@Type' => 'test'
|
|
'@Type' => 'test'
|
|
),
|
|
),
|
|
- 'föo_bär' => '',
|
|
|
|
|
|
+ 'föo_bär' => 'a',
|
|
"Bar" => array(1,2,3),
|
|
"Bar" => array(1,2,3),
|
|
'a' => 'b',
|
|
'a' => 'b',
|
|
);
|
|
);
|
|
@@ -73,7 +73,7 @@ class XmlEncoderTest extends \PHPUnit_Framework_TestCase
|
|
'<response>'.
|
|
'<response>'.
|
|
'<foo-bar id="1" name="Bar"/>'.
|
|
'<foo-bar id="1" name="Bar"/>'.
|
|
'<Foo Type="test"><Bar><![CDATA[Test]]></Bar></Foo>'.
|
|
'<Foo Type="test"><Bar><![CDATA[Test]]></Bar></Foo>'.
|
|
- '<föo_bär><![CDATA[]]></föo_bär>'.
|
|
|
|
|
|
+ '<föo_bär><![CDATA[a]]></föo_bär>'.
|
|
'<Bar>1</Bar>'.
|
|
'<Bar>1</Bar>'.
|
|
'<Bar>2</Bar>'.
|
|
'<Bar>2</Bar>'.
|
|
'<Bar>3</Bar>'.
|
|
'<Bar>3</Bar>'.
|
|
@@ -86,16 +86,16 @@ class XmlEncoderTest extends \PHPUnit_Framework_TestCase
|
|
{
|
|
{
|
|
$obj = new ScalarDummy;
|
|
$obj = new ScalarDummy;
|
|
$obj->xmlFoo = array(
|
|
$obj->xmlFoo = array(
|
|
- 'foo-bar' => '',
|
|
|
|
- 'foo_bar' => '',
|
|
|
|
- 'föo_bär' => '',
|
|
|
|
|
|
+ 'foo-bar' => 'a',
|
|
|
|
+ 'foo_bar' => 'a',
|
|
|
|
+ 'föo_bär' => 'a',
|
|
);
|
|
);
|
|
|
|
|
|
$expected = '<?xml version="1.0"?>'."\n".
|
|
$expected = '<?xml version="1.0"?>'."\n".
|
|
'<response>'.
|
|
'<response>'.
|
|
- '<foo-bar><![CDATA[]]></foo-bar>'.
|
|
|
|
- '<foo_bar><![CDATA[]]></foo_bar>'.
|
|
|
|
- '<föo_bär><![CDATA[]]></föo_bär>'.
|
|
|
|
|
|
+ '<foo-bar><![CDATA[a]]></foo-bar>'.
|
|
|
|
+ '<foo_bar><![CDATA[a]]></foo_bar>'.
|
|
|
|
+ '<föo_bär><![CDATA[a]]></föo_bär>'.
|
|
'</response>'."\n";
|
|
'</response>'."\n";
|
|
|
|
|
|
$this->assertEquals($expected, $this->encoder->encode($obj, 'xml'));
|
|
$this->assertEquals($expected, $this->encoder->encode($obj, 'xml'));
|