function BrowserTestBaseUserAgentTest::prepareRequest
Same name in other branches
- 9 core/tests/Drupal/FunctionalTests/BrowserTestBaseUserAgentTest.php \Drupal\FunctionalTests\BrowserTestBaseUserAgentTest::prepareRequest()
- 10 core/tests/Drupal/FunctionalTests/BrowserTestBaseUserAgentTest.php \Drupal\FunctionalTests\BrowserTestBaseUserAgentTest::prepareRequest()
- 11.x core/tests/Drupal/FunctionalTests/BrowserTestBaseUserAgentTest.php \Drupal\FunctionalTests\BrowserTestBaseUserAgentTest::prepareRequest()
Overrides UiHelperTrait::prepareRequest
File
-
core/
tests/ Drupal/ FunctionalTests/ BrowserTestBaseUserAgentTest.php, line 63
Class
- BrowserTestBaseUserAgentTest
- Tests BrowserTestBase functionality.
Namespace
Drupal\FunctionalTestsCode
protected function prepareRequest() {
$session = $this->getSession();
if ($this->agent) {
$session->setCookie('SIMPLETEST_USER_AGENT', $this->agent);
}
else {
$session->setCookie('SIMPLETEST_USER_AGENT', drupal_generate_test_ua($this->databasePrefix));
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.