You are here

public function PropertyNormalizerTest::testIgnoredAttributes 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::testIgnoredAttributes()

File

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

Class

PropertyNormalizerTest

Namespace

Symfony\Component\Serializer\Tests\Normalizer

Code

public function testIgnoredAttributes() {
  $this->normalizer
    ->setIgnoredAttributes(array(
    'foo',
    'bar',
    'camelCase',
  ));
  $obj = new PropertyDummy();
  $obj->foo = 'foo';
  $obj
    ->setBar('bar');
  $this
    ->assertEquals(array(), $this->normalizer
    ->normalize($obj, 'any'));
}