public function PropertyNormalizerTest::testUnableToNormalizeObjectAttribute in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/serializer/Tests/Normalizer/PropertyNormalizerTest.php \Symfony\Component\Serializer\Tests\Normalizer\PropertyNormalizerTest::testUnableToNormalizeObjectAttribute()
@expectedException \Symfony\Component\Serializer\Exception\LogicException @expectedExceptionMessage Cannot normalize attribute "bar" because injected serializer is not a normalizer
File
- vendor/
symfony/ serializer/ Tests/ Normalizer/ PropertyNormalizerTest.php, line 416
Class
Namespace
Symfony\Component\Serializer\Tests\NormalizerCode
public function testUnableToNormalizeObjectAttribute() {
$serializer = $this
->getMock('Symfony\\Component\\Serializer\\SerializerInterface');
$this->normalizer
->setSerializer($serializer);
$obj = new PropertyDummy();
$object = new \stdClass();
$obj
->setBar($object);
$this->normalizer
->normalize($obj, 'any');
}