projects
/
yaffs-website
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
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
/
LayoutBuilderCompatibilityTestBase.php
diff --git
a/web/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderCompatibilityTestBase.php
b/web/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderCompatibilityTestBase.php
index d5a4cd0b8a8fd7c937b39d8eccf02f95b5433d20..72ee01ac60802b77beebe1385244459c67117037 100644
(file)
--- a/
web/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderCompatibilityTestBase.php
+++ b/
web/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderCompatibilityTestBase.php
@@
-23,7
+23,7
@@
abstract class LayoutBuilderCompatibilityTestBase extends EntityKernelTestBase {
/**
* The entity view display.
*
/**
* The entity view display.
*
- * @var \Drupal\
field_layout\Display\EntityDisplayWithLayout
Interface
+ * @var \Drupal\
layout_builder\Entity\LayoutEntityDisplay
Interface
*/
protected $display;
*/
protected $display;
@@
-86,13
+86,21
@@
abstract class LayoutBuilderCompatibilityTestBase extends EntityKernelTestBase {
/**
* Installs the Layout Builder.
*
/**
* 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);
*/
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);
}
$this->display->setOverridable()->save();
$this->entity = $this->reloadEntity($this->entity);
}
@@
-104,9
+112,6
@@
abstract class LayoutBuilderCompatibilityTestBase extends EntityKernelTestBase {
* The entity to render.
* @param array $attributes
* An array of field attributes to assert.
* 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());
*/
protected function assertFieldAttributes(EntityInterface $entity, array $attributes) {
$view_builder = $this->container->get('entity_type.manager')->getViewBuilder($entity->getEntityTypeId());