diff --git a/core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/SimpleConfigSectionStorage.php b/core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/SimpleConfigSectionStorage.php index fb7345c1a7..9de5f2561a 100644 --- a/core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/SimpleConfigSectionStorage.php +++ b/core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/SimpleConfigSectionStorage.php @@ -101,7 +101,7 @@ protected function getConfigName() { public function getSections() { if (is_null($this->sections)) { $sections = $this->configFactory->get($this->getConfigName())->get('sections') ?: []; - $this->sections = array_map([Section::class, 'fromArray'], $sections); + $this->setSections(array_map([Section::class, 'fromArray'], $sections)); } return $this->sections; } @@ -120,7 +120,7 @@ protected function setSections(array $sections) { public function save() { $sections = array_map(function (Section $section) { return $section->toArray(); - }, $this->sections); + }, $this->getSections()); $config = $this->configFactory->getEditable($this->getConfigName()); $return = $config->get('sections') ? SAVED_UPDATED : SAVED_NEW;