diff --git a/core/tests/Drupal/KernelTests/Core/Config/Storage/FileStorageTest.php b/core/tests/Drupal/KernelTests/Core/Config/Storage/FileStorageTest.php index f4750a6c85..51ccf4bb1d 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/Storage/FileStorageTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/Storage/FileStorageTest.php @@ -79,7 +79,8 @@ public function testUnsupportedDataTypeConfigException() { $name = 'core.extension'; $path = $this->storage->getFilePath($name); $this->expectException(UnsupportedDataTypeConfigException::class); - $this->expectExceptionMessage("Invalid data type in config $name, found in file $path: Malformed inline YAML string: " . '"[bar}" at line 3 (near "foo : [bar}").'); + $this->expectExceptionMessage("Invalid data type in config $name, found in file $path: Malformed inline YAML string: " . '"[bar}" at line 2 (near "foo : [bar}").'); + unlink($path); file_put_contents($path, PHP_EOL . 'foo : [bar}', FILE_APPEND); $this->storage->read($name); }