Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / web / core / modules / layout_builder / tests / src / Kernel / LayoutBuilderInstallTest.php
index aa1b9942c8538e19589e1b25ecdb5ee102d45497..a3ae736da1c84e86b13fc0696eae7cb145d80624 100644 (file)
@@ -4,6 +4,7 @@ namespace Drupal\Tests\layout_builder\Kernel;
 
 use Drupal\field\Entity\FieldConfig;
 use Drupal\field\Entity\FieldStorageConfig;
+use Drupal\layout_builder\Plugin\SectionStorage\OverridesSectionStorage;
 use Drupal\layout_builder\Section;
 
 /**
@@ -35,7 +36,7 @@ class LayoutBuilderInstallTest extends LayoutBuilderCompatibilityTestBase {
     // Add a layout override.
     $this->enableOverrides();
     $this->entity = $this->reloadEntity($this->entity);
-    $this->entity->get('layout_builder__layout')->appendSection(new Section('layout_onecol'));
+    $this->entity->get(OverridesSectionStorage::FIELD_NAME)->appendSection(new Section('layout_onecol'));
     $this->entity->save();
 
     // The rendered entity has now changed. The non-configurable field is shown
@@ -50,7 +51,7 @@ class LayoutBuilderInstallTest extends LayoutBuilderCompatibilityTestBase {
     $this->assertNotEmpty($this->cssSelect('.layout--onecol'));
 
     // Removing the layout restores the original rendering of the entity.
-    $this->entity->get('layout_builder__layout')->removeSection(0);
+    $this->entity->get(OverridesSectionStorage::FIELD_NAME)->removeSection(0);
     $this->entity->save();
     $this->assertFieldAttributes($this->entity, $expected_fields);