You are here

protected function ThunderJavascriptTestBase::assertPageTitle in Thunder 8.2

Same name and namespace in other branches
  1. 8.5 tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::assertPageTitle()
  2. 8.3 tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::assertPageTitle()
  3. 8.4 tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::assertPageTitle()
  4. 6.2.x tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::assertPageTitle()
  5. 6.0.x tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::assertPageTitle()
  6. 6.1.x tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::assertPageTitle()

Assert page title.

Parameters

string $expectedTitle: Expected title.

3 calls to ThunderJavascriptTestBase::assertPageTitle()
ArticleCreationTest::testCreateArticle in tests/src/FunctionalJavascript/ArticleCreationTest.php
Test Creation of Article.
ArticleCreationTest::testCreateArticleWithNoModeration in tests/src/FunctionalJavascript/ArticleCreationTest.php
Test Creation of Article without content moderation.
ArticleCreationTest::testModerationWorkflow in tests/src/FunctionalJavascript/ArticleCreationTest.php
Tests draft creation and that reverting to the default revision works.

File

tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php, line 264

Class

ThunderJavascriptTestBase
Base class for Thunder Javascript functional tests.

Namespace

Drupal\Tests\thunder\FunctionalJavascript

Code

protected function assertPageTitle($expectedTitle) {
  $driver = $this
    ->getSession()
    ->getDriver();
  if ($driver instanceof Selenium2Driver) {
    $actualTitle = $driver
      ->getWebDriverSession()
      ->title();
    static::assertEquals($expectedTitle, $actualTitle, 'Title found');
  }
  else {
    $this
      ->assertSession()
      ->titleEquals($expectedTitle);
  }
}