You are here

public function LayoutBuilderTest::testHtmlEntityFormControllerDecoration in Drupal 9

Same name and namespace in other branches
  1. 10 core/modules/layout_builder/tests/src/Functional/LayoutBuilderTest.php \Drupal\Tests\layout_builder\Functional\LayoutBuilderTest::testHtmlEntityFormControllerDecoration()

Test decorating controller.entity_form while layout_builder is installed.

File

core/modules/layout_builder/tests/src/Functional/LayoutBuilderTest.php, line 457

Class

LayoutBuilderTest
Tests the Layout Builder UI.

Namespace

Drupal\Tests\layout_builder\Functional

Code

public function testHtmlEntityFormControllerDecoration() {
  $assert_session = $this
    ->assertSession();
  $this
    ->drupalLogin($this
    ->drupalCreateUser([
    'configure any layout',
    'administer node display',
  ]));

  // Install module that decorates controller.entity_form.
  \Drupal::service('module_installer')
    ->install([
    'layout_builder_decoration_test',
  ]);
  $this
    ->drupalGet('admin/structure/types/manage/bundle_with_section_field/display/default');
  $assert_session
    ->pageTextContains('Manage Display');
}