function YamlFileLoaderTest::testExceptions
@dataProvider providerTestExceptions
File
- 
              core/tests/ Drupal/ Tests/ Core/ DependencyInjection/ YamlFileLoaderTest.php, line 83 
Class
- YamlFileLoaderTest
- @coversDefaultClass \Drupal\Core\DependencyInjection\YamlFileLoader[[api-linebreak]] @group DependencyInjection
Namespace
Drupal\Tests\Core\DependencyInjectionCode
public function testExceptions($yml, $message) : void {
  vfsStream::setup('drupal', NULL, [
    'modules' => [
      'example' => [
        'example.yml' => $yml,
      ],
    ],
  ]);
  $builder = new ContainerBuilder();
  $yaml_file_loader = new YamlFileLoader($builder);
  $this->expectException(\InvalidArgumentException::class);
  $this->expectExceptionMessage($message);
  $yaml_file_loader->load('vfs://drupal/modules/example/example.yml');
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
