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\DriverCode
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);
}
}
}