You are here

public function PropertyNormalizerTest::testUnableToNormalizeCircularReference in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/serializer/Tests/Normalizer/PropertyNormalizerTest.php \Symfony\Component\Serializer\Tests\Normalizer\PropertyNormalizerTest::testUnableToNormalizeCircularReference()

@expectedException \Symfony\Component\Serializer\Exception\CircularReferenceException

File

vendor/symfony/serializer/Tests/Normalizer/PropertyNormalizerTest.php, line 364

Class

PropertyNormalizerTest

Namespace

Symfony\Component\Serializer\Tests\Normalizer

Code

public function testUnableToNormalizeCircularReference() {
  $serializer = new Serializer(array(
    $this->normalizer,
  ));
  $this->normalizer
    ->setSerializer($serializer);
  $this->normalizer
    ->setCircularReferenceLimit(2);
  $obj = new PropertyCircularReferenceDummy();
  $this->normalizer
    ->normalize($obj);
}