supports() public method

public supports ( array $item )
$item array
Exemplo n.º 1
0
 public function testSupportsUnsupportedClassFormat()
 {
     $resourceMetadataFactoryProphecy = $this->prophesize(ResourceMetadataFactoryInterface::class);
     $resourceMetadataFactoryProphecy->create(Argument::any())->shouldNotBeCalled();
     $resourceMetadataFactory = $resourceMetadataFactoryProphecy->reveal();
     $propertyNameCollectionFactoryProphecy = $this->prophesize(PropertyNameCollectionFactoryInterface::class);
     $propertyNameCollectionFactory = $propertyNameCollectionFactoryProphecy->reveal();
     $propertyMetadataFactoryProphecy = $this->prophesize(PropertyMetadataFactoryInterface::class);
     $propertyMetadataFactory = $propertyMetadataFactoryProphecy->reveal();
     $apiPlatformParser = new ApiPlatformParser($resourceMetadataFactory, $propertyNameCollectionFactory, $propertyMetadataFactory);
     $this->assertFalse($apiPlatformParser->supports(['class' => Dummy::class]));
 }