public function ObjectNormalizerTest::testUnableToNormalizeObjectAttribute in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/serializer/Tests/Normalizer/ObjectNormalizerTest.php \Symfony\Component\Serializer\Tests\Normalizer\ObjectNormalizerTest::testUnableToNormalizeObjectAttribute()
@expectedException \Symfony\Component\Serializer\Exception\LogicException @expectedExceptionMessage Cannot normalize attribute "object" because injected serializer is not a normalizer
File
- vendor/
symfony/ serializer/ Tests/ Normalizer/ ObjectNormalizerTest.php, line 390
Class
- ObjectNormalizerTest
- @author Kévin Dunglas <dunglas@gmail.com>
Namespace
Symfony\Component\Serializer\Tests\NormalizerCode
public function testUnableToNormalizeObjectAttribute() {
$serializer = $this
->getMock('Symfony\\Component\\Serializer\\SerializerInterface');
$this->normalizer
->setSerializer($serializer);
$obj = new ObjectDummy();
$object = new \stdClass();
$obj
->setObject($object);
$this->normalizer
->normalize($obj, 'any');
}