function LayoutBuilderThemeSuggestionsTest::testLayoutListSuggestion

Same name in other branches
  1. 9 core/modules/layout_builder/tests/src/Functional/LayoutBuilderThemeSuggestionsTest.php \Drupal\Tests\layout_builder\Functional\LayoutBuilderThemeSuggestionsTest::testLayoutListSuggestion()
  2. 8.9.x core/modules/layout_builder/tests/src/Functional/LayoutBuilderThemeSuggestionsTest.php \Drupal\Tests\layout_builder\Functional\LayoutBuilderThemeSuggestionsTest::testLayoutListSuggestion()
  3. 11.x core/modules/layout_builder/tests/src/Functional/LayoutBuilderThemeSuggestionsTest.php \Drupal\Tests\layout_builder\Functional\LayoutBuilderThemeSuggestionsTest::testLayoutListSuggestion()

Tests alterations of the layout list via preprocess functions.

File

core/modules/layout_builder/tests/src/Functional/LayoutBuilderThemeSuggestionsTest.php, line 63

Class

LayoutBuilderThemeSuggestionsTest
Tests template suggestions.

Namespace

Drupal\Tests\layout_builder\Functional

Code

public function testLayoutListSuggestion() : void {
    $page = $this->getSession()
        ->getPage();
    $assert_session = $this->assertSession();
    $this->drupalGet('node/1/layout');
    $page->clickLink('Add section');
    $assert_session->pageTextContains('layout_builder_theme_suggestions_test_preprocess_item_list__layouts');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.