namespace Symfony\Component\Serializer\Tests\Encoder;
use PHPUnit\Framework\TestCase;
-use Symfony\Component\Serializer\Tests\Fixtures\Dummy;
-use Symfony\Component\Serializer\Tests\Fixtures\NormalizableTraversableDummy;
-use Symfony\Component\Serializer\Tests\Fixtures\ScalarDummy;
use Symfony\Component\Serializer\Encoder\XmlEncoder;
-use Symfony\Component\Serializer\Serializer;
use Symfony\Component\Serializer\Normalizer\CustomNormalizer;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
+use Symfony\Component\Serializer\Serializer;
+use Symfony\Component\Serializer\Tests\Fixtures\Dummy;
+use Symfony\Component\Serializer\Tests\Fixtures\NormalizableTraversableDummy;
+use Symfony\Component\Serializer\Tests\Fixtures\ScalarDummy;
class XmlEncoderTest extends TestCase
{
public function testEncodeScalarRootAttributes()
{
$array = array(
- '#' => 'Paul',
- '@gender' => 'm',
+ '#' => 'Paul',
+ '@gender' => 'm',
);
$expected = '<?xml version="1.0"?>'."\n".
public function testEncodeRootAttributes()
{
$array = array(
- 'firstname' => 'Paul',
- '@gender' => 'm',
+ 'firstname' => 'Paul',
+ '@gender' => 'm',
);
$expected = '<?xml version="1.0"?>'."\n".
public function testEncodeCdataWrapping()
{
$array = array(
- 'firstname' => 'Paul <or Me>',
+ 'firstname' => 'Paul <or Me>',
);
$expected = '<?xml version="1.0"?>'."\n".