function YamlValidationTest::testNoUuidsInConfig

Same name in other branches
  1. 4.0.x tests/src/Unit/YamlValidationTest.php \Drupal\Tests\examples\Unit\YamlValidationTest::testNoUuidsInConfig()

@dataProvider provideYamls

File

tests/src/Unit/YamlValidationTest.php, line 45

Class

YamlValidationTest
Validate requirements for config YAML.

Namespace

Drupal\Tests\examples\Unit

Code

public function testNoUuidsInConfig($yaml_path) {
    $yaml = Yaml::parse(file_get_contents($yaml_path));
    $this->assertArrayNotHasKey('uuid', $yaml, "YAML in this file contains a uuid key: {$yaml_path}");
}