You are here

public function CustomNormalizerTest::testDeserialize in Zircon Profile 8

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

File

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

Class

CustomNormalizerTest

Namespace

Symfony\Component\Serializer\Tests\Normalizer

Code

public function testDeserialize() {
  $obj = $this->normalizer
    ->denormalize('foo', get_class(new ScalarDummy()), 'xml');
  $this
    ->assertEquals('foo', $obj->xmlFoo);
  $this
    ->assertNull($obj->foo);
  $obj = $this->normalizer
    ->denormalize('foo', get_class(new ScalarDummy()), 'json');
  $this
    ->assertEquals('foo', $obj->foo);
  $this
    ->assertNull($obj->xmlFoo);
}