You are here

public function LanguageSelectionPageConditionTest::testPageTitle in Language Selection Page 8.2

Test the "page title" condition.

Note: this is not really a "condition", just a configurable option.

File

tests/src/Functional/LanguageSelectionPageConditionTest.php, line 271

Class

LanguageSelectionPageConditionTest
Tests that the condition plugins work.

Namespace

Drupal\Tests\language_selection_page\Functional

Code

public function testPageTitle() {
  $title = 'adJKFD#@H5864193177';
  $this
    ->drupalPostForm('admin/config/regional/language/detection/language_selection_page', [
    'title' => $title,
  ], 'Save configuration');
  $node = $this
    ->drupalCreateNode();
  $this
    ->drupalGet('node/' . $node
    ->id());
  $this
    ->assertLanguageSelectionPageLoaded();
  $this
    ->assertSession()
    ->responseContains('<title>' . $title);
  $this
    ->resetConfiguration();
}