You are here

public function GetSetMethodNormalizerTest::testObjectToPopulate 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::testObjectToPopulate()

File

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

Class

GetSetMethodNormalizerTest

Namespace

Symfony\Component\Serializer\Tests\Normalizer

Code

public function testObjectToPopulate() {
  $dummy = new GetSetDummy();
  $dummy
    ->setFoo('foo');
  $obj = $this->normalizer
    ->denormalize(array(
    'bar' => 'bar',
  ), __NAMESPACE__ . '\\GetSetDummy', null, array(
    'object_to_populate' => $dummy,
  ));
  $this
    ->assertEquals($dummy, $obj);
  $this
    ->assertEquals('foo', $obj
    ->getFoo());
  $this
    ->assertEquals('bar', $obj
    ->getBar());
}