function UiHelperTrait::isTestUsingGuzzleClient

Same name and namespace in other branches
  1. 10 core/tests/Drupal/Tests/UiHelperTrait.php \Drupal\Tests\UiHelperTrait::isTestUsingGuzzleClient()
  2. 11.x core/tests/Drupal/Tests/UiHelperTrait.php \Drupal\Tests\UiHelperTrait::isTestUsingGuzzleClient()

Determines if test is using DrupalTestBrowser.

Return value

bool TRUE if test is using DrupalTestBrowser.

File

core/tests/Drupal/Tests/UiHelperTrait.php, line 586

Class

UiHelperTrait
Provides UI helper methods.

Namespace

Drupal\Tests

Code

protected function isTestUsingGuzzleClient() {
  $driver = $this->getSession()
    ->getDriver();
  if ($driver instanceof BrowserKitDriver) {
    return $driver->getClient() instanceof DrupalTestBrowser;
  }
  return FALSE;
}

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