function DisplayPageWebTest::testTitleOutput

Same name in other branches
  1. 9 core/modules/views/tests/src/Functional/Plugin/DisplayPageWebTest.php \Drupal\Tests\views\Functional\Plugin\DisplayPageWebTest::testTitleOutput()
  2. 8.9.x core/modules/views/tests/src/Functional/Plugin/DisplayPageWebTest.php \Drupal\Tests\views\Functional\Plugin\DisplayPageWebTest::testTitleOutput()
  3. 10 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.

Namespace

Drupal\Tests\views\Functional\Plugin

Code

public function testTitleOutput() : void {
    $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.');
}

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