function BasicAuthTestTrait::basicAuthGet
Retrieves a Drupal path or an absolute path using basic authentication.
Parameters
\Drupal\Core\Url|string $path: Drupal path or URL to load into the internal browser.
string $username: The username to use for basic authentication.
string $password: The password to use for basic authentication.
array $options: (optional) Options to be forwarded to the url generator.
Return value
string The retrieved HTML string, also available as $this->getRawContent().
File
-
core/
modules/ basic_auth/ src/ Tests/ BasicAuthTestTrait.php, line 32
Class
- BasicAuthTestTrait
- Provides common functionality for Basic Authentication test classes.
Namespace
Drupal\basic_auth\TestsCode
protected function basicAuthGet($path, $username, $password, array $options = []) {
return $this->drupalGet($path, $options, $this->getBasicAuthHeaders($username, $password));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.