You are here

public function CustomNormalizerTest::testSerialize in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/serializer/Tests/Normalizer/CustomNormalizerTest.php \Symfony\Component\Serializer\Tests\Normalizer\CustomNormalizerTest::testSerialize()

File

vendor/symfony/serializer/Tests/Normalizer/CustomNormalizerTest.php, line 37

Class

CustomNormalizerTest

Namespace

Symfony\Component\Serializer\Tests\Normalizer

Code

public function testSerialize() {
  $obj = new ScalarDummy();
  $obj->foo = 'foo';
  $obj->xmlFoo = 'xml';
  $this
    ->assertEquals('foo', $this->normalizer
    ->normalize($obj, 'json'));
  $this
    ->assertEquals('xml', $this->normalizer
    ->normalize($obj, 'xml'));
}