You are here

public function GetSetMethodNormalizerTest::testConstructorDenormalizeWithNullArgument in Zircon Profile 8

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

File

vendor/symfony/serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php, line 190

Class

GetSetMethodNormalizerTest

Namespace

Symfony\Component\Serializer\Tests\Normalizer

Code

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