You are here

protected function BasicAuthTestTrait::basicAuthGet in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/basic_auth/src/Tests/BasicAuthTestTrait.php \Drupal\basic_auth\Tests\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().

8 calls to BasicAuthTestTrait::basicAuthGet()
BasicAuthTest::testBasicAuth in core/modules/basic_auth/src/Tests/Authentication/BasicAuthTest.php
Test http basic authentication.
BasicAuthTest::testGlobalLoginFloodControl in core/modules/basic_auth/src/Tests/Authentication/BasicAuthTest.php
Test the global login flood control.
BasicAuthTest::testLocale in core/modules/basic_auth/src/Tests/Authentication/BasicAuthTest.php
Tests compatibility with locale/UI translation.
BasicAuthTest::testPerUserLoginFloodControl in core/modules/basic_auth/src/Tests/Authentication/BasicAuthTest.php
Test the per-user login flood control.
BasicAuthTest::testUnauthorizedErrorMessage in core/modules/basic_auth/src/Tests/Authentication/BasicAuthTest.php
Tests if a comprehensive message is displayed when the route is denied.

... See full list

File

core/modules/basic_auth/src/Tests/BasicAuthTestTrait.php, line 30
Contains \Drupal\basic_auth\Tests\BasicAuthTestTrait.

Class

BasicAuthTestTrait
Provides common functionality for Basic Authentication test classes.

Namespace

Drupal\basic_auth\Tests

Code

protected function basicAuthGet($path, $username, $password, array $options = []) {
  return $this
    ->drupalGet($path, $options, $this
    ->getBasicAuthHeaders($username, $password));
}