You are here

public function DisplayPageWebTest::testTitleOutput in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/views/tests/src/Functional/Plugin/DisplayPageWebTest.php \Drupal\Tests\views\Functional\Plugin\DisplayPageWebTest::testTitleOutput()
  2. 9 core/modules/views/tests/src/Functional/Plugin/DisplayPageWebTest.php \Drupal\Tests\views\Functional\Plugin\DisplayPageWebTest::testTitleOutput()

Tests the title is not displayed in the output.

File

core/modules/views/tests/src/Functional/Plugin/DisplayPageWebTest.php, line 132

Class

DisplayPageWebTest
Tests the views page display plugin as webtest.

Namespace

Drupal\Tests\views\Functional\Plugin

Code

public function testTitleOutput() {
  $this
    ->drupalGet('test_page_display_200');
  $view = Views::getView('test_page_display');
  $xpath = $this
    ->cssSelect('div.view:contains("' . $view
    ->getTitle() . '")');
  $this
    ->assertEmpty($xpath, 'The view title was not displayed in the view markup.');
}