You are here

public function GetSetMethodNormalizerTest::testUnableToNormalizeObjectAttribute 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::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/GetSetMethodNormalizerTest.php, line 470

Class

GetSetMethodNormalizerTest

Namespace

Symfony\Component\Serializer\Tests\Normalizer

Code

public function testUnableToNormalizeObjectAttribute() {
  $serializer = $this
    ->getMock('Symfony\\Component\\Serializer\\SerializerInterface');
  $this->normalizer
    ->setSerializer($serializer);
  $obj = new GetSetDummy();
  $object = new \stdClass();
  $obj
    ->setObject($object);
  $this->normalizer
    ->normalize($obj, 'any');
}