You are here

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

File

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

Class

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

Namespace

Symfony\Component\Serializer\Tests\Normalizer

Code

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