You are here

protected function ViewsTest::submitPluginForm in Search API 8

Submits a Views plugin's configuration form.

Parameters

array $edit: The values to set in the form.

2 calls to ViewsTest::submitPluginForm()
ViewsTest::submitFieldsForm in tests/src/Functional/ViewsTest.php
Submits the field handler config form currently displayed.
ViewsTest::testViewsAdmin in tests/src/Functional/ViewsTest.php
Tests the Views admin UI and field handlers.

File

tests/src/Functional/ViewsTest.php, line 1088

Class

ViewsTest
Tests the Views integration of the Search API.

Namespace

Drupal\Tests\search_api\Functional

Code

protected function submitPluginForm(array $edit) {
  $button_label = 'Apply';
  $buttons = $this
    ->xpath('//input[starts-with(@value, :label)]', [
    ':label' => $button_label,
  ]);
  if ($buttons) {
    $button_label = $buttons[0]
      ->getAttribute('value');
  }
  $this
    ->submitForm($edit, $button_label);
  $this
    ->assertSession()
    ->statusCodeEquals(200);
}