function AssertLegacyTrait::assertTitle

Same name in other branches
  1. 9 core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php \Drupal\FunctionalTests\AssertLegacyTrait::assertTitle()

Pass if the page title is the given string.

Parameters

string $expected_title: The string the page title should be.

Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->titleEquals() instead.

49 calls to AssertLegacyTrait::assertTitle()
AreaTitleWebTest::testTitleText in core/modules/views/tests/src/Functional/Handler/AreaTitleWebTest.php
Tests the title area handler.
BlockContentListTest::testListing in core/modules/block_content/tests/src/Functional/BlockContentListTest.php
Tests the custom block listing page.
BlockContentListViewsTest::testListing in core/modules/block_content/tests/src/Functional/BlockContentListViewsTest.php
Tests the custom block listing page.
BlockContentTypeTest::testBlockContentTypeEditing in core/modules/block_content/tests/src/Functional/BlockContentTypeTest.php
Tests editing a block type using the UI.
BlockTest::testBlockThemeSelector in core/modules/block/tests/src/Functional/BlockTest.php
Tests that the block form has a theme selector when not passed via the URL.

... See full list

File

core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php, line 342

Class

AssertLegacyTrait
Provides convenience methods for assertions in browser tests.

Namespace

Drupal\FunctionalTests

Code

protected function assertTitle($expected_title) {
    // Cast MarkupInterface to string.
    $expected_title = (string) $expected_title;
    return $this->assertSession()
        ->titleEquals($expected_title);
}

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