You are here

protected function WebformAssertLegacyTrait::assertTitle in Webform 8.5

Same name and namespace in other branches
  1. 6.x tests/src/Traits/WebformAssertLegacyTrait.php \Drupal\Tests\webform\Traits\WebformAssertLegacyTrait::assertTitle()

Pass if the page title is the given string.

Parameters

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

File

tests/src/Traits/WebformAssertLegacyTrait.php, line 335

Class

WebformAssertLegacyTrait
Provides convenience methods for assertions in browser tests.

Namespace

Drupal\Tests\webform\Traits

Code

protected function assertTitle($expected_title) {

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