You are here

public function ObjectNormalizerTest::testConstructorDenormalize 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::testConstructorDenormalize()

File

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

Class

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

Namespace

Symfony\Component\Serializer\Tests\Normalizer

Code

public function testConstructorDenormalize() {
  $obj = $this->normalizer
    ->denormalize(array(
    'foo' => 'foo',
    'bar' => 'bar',
    'baz' => true,
    'fooBar' => 'foobar',
  ), __NAMESPACE__ . '\\ObjectConstructorDummy', 'any');
  $this
    ->assertEquals('foo', $obj
    ->getFoo());
  $this
    ->assertEquals('bar', $obj->bar);
  $this
    ->assertTrue($obj
    ->isBaz());
}