Issue #3402548 by alexpott, mikelutz, el7cosmos: YamlFileLoaderTest fails if...
Issue #3402548 by alexpott, mikelutz, el7cosmos: YamlFileLoaderTest fails if you have PECL yaml installed
(cherry picked from commit aac47f0d)
(cherry picked from commit bea5ccb1)
thrownewInvalidArgumentException(sprintf('The service file "%s" is not valid: it contains invalid keys %s. Services have to be added under "services" and Parameters under "parameters".',$file,$invalid_keys));
thrownewInvalidArgumentException(sprintf('The service file "%s" is not valid: it contains invalid root key(s) "%s". Services have to be added under "services" and Parameters under "parameters".',$file,implode('", "',$invalid_keys)));
@@ -171,10 +171,16 @@ public function providerTestExceptions() {
],
'YAML must be valid'=>[<<<YAML
do not:
do this for the love of Foo Bar!
do: this: for the love of Foo Bar!
YAML,
'The file "vfs://drupal/modules/example/example.yml" does not contain valid YAML',
],
'YAML must have expected keys'=>[<<<YAML
"do not":
do: this
YAML,
'The service file "vfs://drupal/modules/example/example.yml" is not valid: it contains invalid root key(s) "do not". Services have to be added under "services" and Parameters under "parameters".',