diff --git a/core/modules/config/src/StorageReplaceDataWrapper.php b/core/modules/config/src/StorageReplaceDataWrapper.php index 58b3b49..c8d358b 100644 --- a/core/modules/config/src/StorageReplaceDataWrapper.php +++ b/core/modules/config/src/StorageReplaceDataWrapper.php @@ -44,6 +44,7 @@ class StorageReplaceDataWrapper implements StorageInterface { public function __construct(StorageInterface $storage, $collection = StorageInterface::DEFAULT_COLLECTION) { $this->storage = $storage; $this->collection = $collection; + $this->replacementData[$collection] = []; } /** @@ -164,8 +165,10 @@ public function deleteAll($prefix = '') { * {@inheritdoc} */ public function createCollection($collection) { - $this->collection = $collection; - return $this->storage->createCollection($collection); + return new static( + $this->storage->createCollection($collection), + $collection + ); } /** diff --git a/core/modules/config/src/Tests/ConfigSingleImportExportTest.php b/core/modules/config/src/Tests/ConfigSingleImportExportTest.php index a5b8386..d7f9c7f 100644 --- a/core/modules/config/src/Tests/ConfigSingleImportExportTest.php +++ b/core/modules/config/src/Tests/ConfigSingleImportExportTest.php @@ -20,7 +20,8 @@ class ConfigSingleImportExportTest extends WebTestBase { public static $modules = [ 'block', 'config', - 'config_test' + 'config_test', + 'language', ]; protected function setUp() {