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

testCreateXml() public method

public testCreateXml ( PropertyMetadata $expectedPropertyMetadata )
$expectedPropertyMetadata ApiPlatform\Core\Metadata\Property\PropertyMetadata
    public function testCreateXml(PropertyMetadata $expectedPropertyMetadata)
    {
        $configPath = __DIR__ . '/../../../Fixtures/FileConfigurations/resources.xml';
        $propertyMetadataFactory = new ExtractorPropertyMetadataFactory(new XmlExtractor([$configPath]));
        $propertyMetadata = $propertyMetadataFactory->create(FileConfigDummy::class, 'foo');
        $this->assertInstanceOf(PropertyMetadata::class, $propertyMetadata);
        $this->assertEquals($expectedPropertyMetadata, $propertyMetadata);
    }