Author: Kévin Dunglas (dunglas@gmail.com)
Author: Antoine Bluchet (soyuka@gmail.com)
Inheritance: implements ApiPlatform\Core\Metadata\Resource\Factory\ResourceNameCollectionFactoryInterface
 public function testYamlSingleResourceName()
 {
     $configPath = __DIR__ . '/../../../Fixtures/FileConfigurations/single_resource.yml';
     $factory = new ExtractorResourceNameCollectionFactory(new YamlExtractor([$configPath]));
     $this->assertEquals($factory->create(), new ResourceNameCollection([FileConfigDummy::class]));
 }
 /**
  * @expectedException \ApiPlatform\Core\Exception\ResourceClassNotFoundException
  * @expectedExceptionMessage Resource "ApiPlatform\Core\Tests\Fixtures\TestBundle\Entity\ThisDoesNotExist" not found.
  */
 public function testYamlDoesNotExistMetadataFactory()
 {
     $configPath = __DIR__ . '/../../../Fixtures/FileConfigurations/resourcenotfound.yml';
     $factory = new ExtractorResourceNameCollectionFactory(new YamlExtractor([$configPath]));
     $resourceMetadataFactory = new ExtractorResourceMetadataFactory(new YamlExtractor([$configPath]));
     foreach ($factory->create() as $resourceName) {
         $resourceMetadataFactory->create($resourceName);
     }
 }