You are here

public function ObjectNormalizerTest::testDenormalizeWithObject in Zircon Profile 8

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

File

vendor/symfony/serializer/Tests/Normalizer/ObjectNormalizerTest.php, line 89

Class

ObjectNormalizerTest
@author Kévin Dunglas <dunglas@gmail.com>

Namespace

Symfony\Component\Serializer\Tests\Normalizer

Code

public function testDenormalizeWithObject() {
  $data = new \stdClass();
  $data->foo = 'foo';
  $data->bar = 'bar';
  $data->fooBar = 'foobar';
  $obj = $this->normalizer
    ->denormalize($data, __NAMESPACE__ . '\\ObjectDummy', 'any');
  $this
    ->assertEquals('foo', $obj
    ->getFoo());
  $this
    ->assertEquals('bar', $obj->bar);
}