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
/
LayoutBuilderInstallTest.php
diff --git
a/web/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderInstallTest.php
b/web/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderInstallTest.php
index fa646df1c91b10564a04df86110ec6e9fcd80d20..a3ae736da1c84e86b13fc0696eae7cb145d80624 100644
(file)
--- a/
web/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderInstallTest.php
+++ b/
web/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderInstallTest.php
@@
-4,6
+4,7
@@
namespace Drupal\Tests\layout_builder\Kernel;
use Drupal\field\Entity\FieldConfig;
use Drupal\field\Entity\FieldStorageConfig;
use Drupal\field\Entity\FieldConfig;
use Drupal\field\Entity\FieldStorageConfig;
+use Drupal\layout_builder\Plugin\SectionStorage\OverridesSectionStorage;
use Drupal\layout_builder\Section;
/**
use Drupal\layout_builder\Section;
/**
@@
-33,7
+34,9
@@
class LayoutBuilderInstallTest extends LayoutBuilderCompatibilityTestBase {
$this->assertFieldAttributes($this->entity, $expected_fields);
// Add a layout override.
$this->assertFieldAttributes($this->entity, $expected_fields);
// Add a layout override.
- $this->entity->get('layout_builder__layout')->appendSection(new Section('layout_onecol'));
+ $this->enableOverrides();
+ $this->entity = $this->reloadEntity($this->entity);
+ $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->entity->save();
// The rendered entity has now changed. The non-configurable field is shown
@@
-48,7
+51,7
@@
class LayoutBuilderInstallTest extends LayoutBuilderCompatibilityTestBase {
$this->assertNotEmpty($this->cssSelect('.layout--onecol'));
// Removing the layout restores the original rendering of the entity.
$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);
$this->entity->save();
$this->assertFieldAttributes($this->entity, $expected_fields);