public function HtmlTitleLayoutBuilderTest::testLayoutBuilder in HTML Title 8
Test that this module works in combination with layout_builder.
File
- tests/
src/ Functional/ HtmlTitleLayoutBuilderTest.php, line 50
Class
- HtmlTitleLayoutBuilderTest
- Tests the HTML Title in combination with layout_builder.
Namespace
Drupal\Tests\html_title\FunctionalCode
public function testLayoutBuilder() {
// Enable layout_builder and add the title field.
$this
->drupalGet('admin/structure/types/manage/test/display');
$this
->submitForm([
'layout[enabled]' => TRUE,
], 'Save');
$this
->clickLink('Manage layout');
$this
->clickLink('Add block');
$this
->clickLink('Title');
$this
->submitForm([], 'Add block');
$this
->submitForm([], 'Save layout');
$this
->drupalGet('node/' . $this->node
->id());
// Check that the title field correctly filters the HTML.
$this
->assertSession()
->responseContains('Test <sup>sup</sup>-tag');
}