You are here

protected function UiHelperTrait::isTestUsingGuzzleClient in Drupal 10

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

4 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

File

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

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;
}