protected function UiHelperTrait::prepareRequest in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/UiHelperTrait.php \Drupal\Tests\UiHelperTrait::prepareRequest()
- 9 core/tests/Drupal/Tests/UiHelperTrait.php \Drupal\Tests\UiHelperTrait::prepareRequest()
Prepare for a request to testing site.
The testing site is protected via a SIMPLETEST_USER_AGENT cookie that is checked by drupal_valid_test_ua().
See also
1 call to UiHelperTrait::prepareRequest()
- BrowserWithJavascriptTest::drupalGetWithAlert in core/
tests/ Drupal/ FunctionalJavascriptTests/ BrowserWithJavascriptTest.php - Retrieves a Drupal path or an absolute path.
1 method overrides UiHelperTrait::prepareRequest()
- BrowserTestBaseUserAgentTest::prepareRequest in core/
tests/ Drupal/ FunctionalTests/ BrowserTestBaseUserAgentTest.php - Prepare for a request to testing site.
File
- core/
tests/ Drupal/ Tests/ UiHelperTrait.php, line 342
Class
- UiHelperTrait
- Provides UI helper methods.
Namespace
Drupal\TestsCode
protected function prepareRequest() {
$session = $this
->getSession();
$session
->setCookie('SIMPLETEST_USER_AGENT', drupal_generate_test_ua($this->databasePrefix));
}