ApiPlatform\Core\Tests\Metadata\Property\Factory\ExtractorPropertyMetadataFactoryTest::testCreateWithParentPropertyMetadataFactoryYaml PHP Method

testCreateWithParentPropertyMetadataFactoryYaml() public method

public testCreateWithParentPropertyMetadataFactoryYaml ( PropertyMetadata $expectedPropertyMetadata )
$expectedPropertyMetadata ApiPlatform\Core\Metadata\Property\PropertyMetadata
    public function testCreateWithParentPropertyMetadataFactoryYaml(PropertyMetadata $expectedPropertyMetadata)
    {
        $configPath = __DIR__ . '/../../../Fixtures/FileConfigurations/resources.yml';
        $decorated = $this->prophesize(PropertyMetadataFactoryInterface::class);
        $decorated->create(FileConfigDummy::class, 'foo', [])->willReturn(new PropertyMetadata(null, null, null, null, true, null, null, false, null, null, ['Foo']))->shouldBeCalled();
        $propertyMetadataFactory = new ExtractorPropertyMetadataFactory(new YamlExtractor([$configPath]), $decorated->reveal());
        $propertyMetadata = $propertyMetadataFactory->create(FileConfigDummy::class, 'foo');
        $this->assertInstanceOf(PropertyMetadata::class, $propertyMetadata);
        $this->assertEquals($expectedPropertyMetadata, $propertyMetadata);
    }