use Drupal\field\Entity\FieldConfig;
use Drupal\field\Entity\FieldStorageConfig;
+use Drupal\layout_builder\Plugin\SectionStorage\OverridesSectionStorage;
use Drupal\layout_builder\Section;
/**
// 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
$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);