Pull merge.
[yaffs-website] / web / core / modules / layout_builder / tests / src / Functional / LayoutSectionTest.php
index d5e0c7523c8905b8068ea3fa254b7828ba4df12b..e29609b30e712a11fc7ad7b37f626a3089d2c159 100644 (file)
@@ -4,6 +4,7 @@ namespace Drupal\Tests\layout_builder\Functional;
 
 use Drupal\language\Entity\ConfigurableLanguage;
 use Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay;
+use Drupal\layout_builder\Plugin\SectionStorage\OverridesSectionStorage;
 use Drupal\layout_builder\Section;
 use Drupal\layout_builder\SectionComponent;
 use Drupal\Tests\BrowserTestBase;
@@ -20,13 +21,6 @@ class LayoutSectionTest extends BrowserTestBase {
    */
   public static $modules = ['field_ui', 'layout_builder', 'node', 'block_test'];
 
-  /**
-   * The name of the layout section field.
-   *
-   * @var string
-   */
-  protected $fieldName = 'layout_builder__layout';
-
   /**
    * {@inheritdoc}
    */
@@ -41,6 +35,7 @@ class LayoutSectionTest extends BrowserTestBase {
     ]);
 
     LayoutBuilderEntityViewDisplay::load('node.bundle_with_section_field.default')
+      ->enableLayoutBuilder()
       ->setOverridable()
       ->save();
 
@@ -225,7 +220,7 @@ class LayoutSectionTest extends BrowserTestBase {
     ]);
     $entity->addTranslation('es', [
       'title' => 'Translated node title',
-      $this->fieldName => [
+      OverridesSectionStorage::FIELD_NAME => [
         [
           'section' => new Section('layout_twocol', [], [
             'foo' => new SectionComponent('foo', 'first', [
@@ -372,7 +367,7 @@ class LayoutSectionTest extends BrowserTestBase {
           'value' => 'The node body',
         ],
       ],
-      $this->fieldName => $section_values,
+      OverridesSectionStorage::FIELD_NAME => $section_values,
     ]);
   }