supportsNormalization() public méthode

public supportsNormalization ( $data, $format = null )
 public function testSupportsNormalize()
 {
     $resourceClassResolverProphecy = $this->prophesize(ResourceClassResolverInterface::class);
     $iriConvert = $this->prophesize(IriConverterInterface::class);
     $contextBuilder = $this->prophesize(ContextBuilderInterface::class);
     $contextBuilder->getResourceContextUri('Foo')->willReturn('/contexts/Foo');
     $iriConvert->getIriFromResourceClass('Foo')->willReturn('/foos');
     $normalizer = new CollectionNormalizer($contextBuilder->reveal(), $resourceClassResolverProphecy->reveal(), $iriConvert->reveal());
     $this->assertTrue($normalizer->supportsNormalization([], CollectionNormalizer::FORMAT));
     $this->assertTrue($normalizer->supportsNormalization(new \ArrayObject(), CollectionNormalizer::FORMAT));
     $this->assertFalse($normalizer->supportsNormalization([], 'xml'));
     $this->assertFalse($normalizer->supportsNormalization(new \ArrayObject(), 'xml'));
 }