function BasicAuthTestTrait::basicAuthPostForm
Executes a form submission using basic authentication.
Parameters
string $path: Location of the post form.
array $edit: Field data in an associative array.
string $submit: Value of the submit button whose click is to be emulated.
string $username: The username to use for basic authentication.
string $password: The password to use for basic authentication.
array $options: Options to be forwarded to the url generator.
string $form_html_id: (optional) HTML ID of the form to be submitted.
string $extra_post: (optional) A string of additional data to append to the POST submission.
Return value
string The retrieved HTML string.
See also
\Drupal\simpletest\WebTestBase::drupalPostForm()
File
-
core/
modules/ basic_auth/ src/ Tests/ BasicAuthTestTrait.php, line 61
Class
- BasicAuthTestTrait
- Provides common functionality for Basic Authentication test classes.
Namespace
Drupal\basic_auth\TestsCode
protected function basicAuthPostForm($path, $edit, $submit, $username, $password, array $options = [], $form_html_id = NULL, $extra_post = NULL) {
return $this->drupalPostForm($path, $edit, $submit, $options, $this->getBasicAuthHeaders($username, $password), $form_html_id, $extra_post);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.