public function GetSetMethodNormalizerTest::testObjectToPopulate in Zircon Profile 8
Same name and namespace in other branches
- 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
Namespace
Symfony\Component\Serializer\Tests\NormalizerCode
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());
}