public function BrowserTestBaseTest::testAssertTitle in Drupal 9
Tests legacy assertTitle().
@group legacy
File
- core/
tests/ Drupal/ FunctionalTests/ BrowserTestBaseTest.php, line 276
Class
- BrowserTestBaseTest
- Tests BrowserTestBase functionality.
Namespace
Drupal\FunctionalTestsCode
public function testAssertTitle() {
$this
->expectDeprecation('AssertLegacyTrait::assertTitle() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->titleEquals() instead. See https://www.drupal.org/node/3129738');
$this
->drupalGet('test-encoded');
$this
->assertTitle("Page with encoded HTML | Drupal");
}