You are here

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

File

vendor/symfony/serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php, line 390

Class

GetSetMethodNormalizerTest

Namespace

Symfony\Component\Serializer\Tests\Normalizer

Code

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