You are here

protected function SearchTestBase::submitGetForm in Drupal 8

Same name in this branch
  1. 8 core/modules/search/src/Tests/SearchTestBase.php \Drupal\search\Tests\SearchTestBase::submitGetForm()
  2. 8 core/modules/search/tests/src/Functional/SearchTestBase.php \Drupal\Tests\search\Functional\SearchTestBase::submitGetForm()

Submission of a form via press submit button.

Parameters

string $path: Location of the form to be submitted: either a Drupal path, absolute path, or NULL to use the current page.

array $edit: Form field data to submit. Unlike drupalPostForm(), this does not support file uploads.

string $submit: Value of the submit button to submit clicking. Unlike drupalPostForm(), this does not support AJAX.

string $form_html_id: (optional) HTML ID of the form, to disambiguate.

Deprecated

in drupal:8.6.0 and is removed from drupal:9.0.0. Use \Drupal\Tests\BrowserTestBase::drupalPostForm() instead.

See also

https://www.drupal.org/node/2979950

File

core/modules/search/tests/src/Functional/SearchTestBase.php, line 56

Class

SearchTestBase
Defines the common search test code.

Namespace

Drupal\Tests\search\Functional

Code

protected function submitGetForm($path, $edit, $submit, $form_html_id = NULL) {
  @trigger_error(__CLASS__ . '::' . __FUNCTION__ . '() is deprecated in Drupal 8.6.x, for removal before the Drupal 9.0.0 release. Use \\Drupal\\Tests\\BrowserTestBase::drupalPostForm() instead. See https://www.drupal.org/node/2979950.', E_USER_DEPRECATED);
  $this
    ->drupalPostForm($path, $edit, $submit, [], $form_html_id);
}