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

testCreateWithParentPropertyMetadataFactoryYaml() public method

    public function testCreateWithParentPropertyMetadataFactoryYaml()
    {
        $configPath = __DIR__ . '/../../../Fixtures/FileConfigurations/resources.yml';
        $decorated = $this->prophesize(PropertyNameCollectionFactoryInterface::class);
        $decorated->create(FileConfigDummy::class, [])->willReturn(new PropertyNameCollection(['id']))->shouldBeCalled();
        $this->assertEquals((new ExtractorPropertyNameCollectionFactory(new YamlExtractor([$configPath]), $decorated->reveal()))->create(FileConfigDummy::class), new PropertyNameCollection(['id', 'foo', 'name']));
    }