public function InlineBlockTitleAutomaticTest::testAutomaticTitleLayoutSectionEquals in Inline Block Title Automatic 8
Test layout builder detects equal section lists correctly.
File
- tests/
src/ Functional/ InlineBlockTitleAutomaticTest.php, line 122
Class
- InlineBlockTitleAutomaticTest
- Test the inline block automatic module.
Namespace
Drupal\Tests\inline_block_title_automatic\FunctionalCode
public function testAutomaticTitleLayoutSectionEquals() {
// Enable the module and save a version of an inline block that will include
// an automatic title.
$this->container
->get('module_installer')
->install([
'inline_block_title_automatic',
]);
$this
->drupalGet("layout_builder/add/block/overrides/node.{$this->node->id()}/0/content/inline_block:rich_text");
$this
->submitForm([], 'Add block');
$this
->submitForm([], 'Save layout');
// Load two copies of the entity and ensure the layouts are considered
// equal.
$node_a = $this
->reloadEntity($this->node);
$node_b = $this
->reloadEntity($this->node);
$this
->assertTrue($node_a->layout_builder__layout
->equals($node_b->layout_builder__layout));
}