public function GetSetMethodNormalizerTest::testIgnoredAttributes

File

drupal/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php, line 83

Class

GetSetMethodNormalizerTest

Namespace

Symfony\Component\Serializer\Tests\Normalizer

Code

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