function DrupalTestBrowser::getClient
Same name in other branches
- 9 core/tests/Drupal/Tests/DrupalTestBrowser.php \Drupal\Tests\DrupalTestBrowser::getClient()
- 11.x core/tests/Drupal/Tests/DrupalTestBrowser.php \Drupal\Tests\DrupalTestBrowser::getClient()
Gets the Guzzle client.
Return value
\GuzzleHttp\ClientInterface The Guzzle client.
File
-
core/
tests/ Drupal/ Tests/ DrupalTestBrowser.php, line 71
Class
- DrupalTestBrowser
- Enables a BrowserKitDriver mink driver to use a Guzzle client.
Namespace
Drupal\TestsCode
public function getClient() {
if (!$this->client) {
$this->client = new Client([
'allow_redirects' => FALSE,
'cookies' => TRUE,
]);
}
return $this->client;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.