Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. BrowserKitDriver.php

function BrowserKitDriver::__construct

Initializes BrowserKit driver.

Parameters

string|null $baseUrl Base URL for HttpKernel clients:

File

vendor/behat/mink-browserkit-driver/src/BrowserKitDriver.php, line 57

Class

BrowserKitDriver
Symfony BrowserKit driver.

Namespace

Behat\Mink\Driver

Code

public function __construct(AbstractBrowser $client, ?string $baseUrl = null) {
    $this->client = $client;
    $this->client
        ->followRedirects(true);
    if ($baseUrl !== null && $client instanceof HttpKernelBrowser) {
        $basePath = parse_url($baseUrl, PHP_URL_PATH);
        if (\is_string($basePath)) {
            $client->setServerParameter('SCRIPT_FILENAME', $basePath);
        }
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal