/**
* The entity view display.
*
- * @var \Drupal\field_layout\Display\EntityDisplayWithLayoutInterface
+ * @var \Drupal\layout_builder\Entity\LayoutEntityDisplayInterface
*/
protected $display;
/**
* Installs the Layout Builder.
*
- * Also configures and reloads the entity display, and reloads the entity.
+ * Also configures and reloads the entity display.
*/
protected function installLayoutBuilder() {
$this->container->get('module_installer')->install(['layout_builder']);
$this->refreshServices();
$this->display = $this->reloadEntity($this->display);
+ $this->display->enableLayoutBuilder()->save();
+ $this->entity = $this->reloadEntity($this->entity);
+ }
+
+ /**
+ * Enables overrides for the display and reloads the entity.
+ */
+ protected function enableOverrides() {
$this->display->setOverridable()->save();
$this->entity = $this->reloadEntity($this->entity);
}
* The entity to render.
* @param array $attributes
* An array of field attributes to assert.
- *
- * @return string
- * The rendered string output (typically HTML).
*/
protected function assertFieldAttributes(EntityInterface $entity, array $attributes) {
$view_builder = $this->container->get('entity_type.manager')->getViewBuilder($entity->getEntityTypeId());