function UiHelperTrait::isTestUsingGuzzleClient

Same name in other branches
  1. 9 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.

7 calls to UiHelperTrait::isTestUsingGuzzleClient()
BrowserTestBase::getHttpClient in core/tests/Drupal/Tests/BrowserTestBase.php
Obtain the HTTP client for the system under test.
BrowserTestBaseTest::testGoTo in core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php
Tests basic page test.
BrowserWithJavascriptTest::drupalGetWithAlert in core/tests/Drupal/FunctionalJavascriptTests/BrowserWithJavascriptTest.php
Retrieves a Drupal path or an absolute path.
BrowserWithJavascriptTest::testJavascript in core/tests/Drupal/FunctionalJavascriptTests/BrowserWithJavascriptTest.php
UiHelperTrait::click in core/tests/Drupal/Tests/UiHelperTrait.php
Clicks the element with the given CSS selector.

... See full list

File

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

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.