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 / LayoutSectionItemListTest.php
index af8395f1731a40da12371a7e36bc33a6f579eb15..4231530fd7acd6f7afdc90c87a3ac2b5103806b6 100644 (file)
@@ -4,6 +4,7 @@ namespace Drupal\Tests\layout_builder\Kernel;
 
 use Drupal\entity_test\Entity\EntityTestBaseFieldDisplay;
 use Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay;
+use Drupal\layout_builder\Plugin\SectionStorage\OverridesSectionStorage;
 
 /**
  * Tests the field type for Layout Sections.
@@ -32,17 +33,20 @@ class LayoutSectionItemListTest extends SectionStorageTestBase {
       'bundle' => 'entity_test_base_field_display',
       'mode' => 'default',
       'status' => TRUE,
-    ])->setOverridable()->save();
+    ])
+      ->enableLayoutBuilder()
+      ->setOverridable()
+      ->save();
 
     array_map(function ($row) {
       return ['section' => $row];
     }, $section_data);
     $entity = EntityTestBaseFieldDisplay::create([
       'name' => 'The test entity',
-      'layout_builder__layout' => $section_data,
+      OverridesSectionStorage::FIELD_NAME => $section_data,
     ]);
     $entity->save();
-    return $entity->get('layout_builder__layout');
+    return $entity->get(OverridesSectionStorage::FIELD_NAME);
   }
 
 }