You are here

protected function SearchApiBulkFormTest::assertActionsApplied in Search API 8

Asserts that the given actions were applied via the bulk form.

Parameters

array $expected_actions: A list of expected actions. Each item is an indexed array with the following structure:

  • 0: The action plugin ID.
  • 1: The entity type ID.
  • 2: The entity ID.
1 call to SearchApiBulkFormTest::assertActionsApplied()
SearchApiBulkFormTest::testBulkForm in tests/src/Functional/SearchApiBulkFormTest.php
Tests the Views bulk form.

File

tests/src/Functional/SearchApiBulkFormTest.php, line 197

Class

SearchApiBulkFormTest
Tests the Search API bulk form Views field plugin.

Namespace

Drupal\Tests\search_api\Functional

Code

protected function assertActionsApplied(array $expected_actions) {
  $actual_actions = \Drupal::state()
    ->get('search_api_test_bulk_form', []);
  $this
    ->assertSame($expected_actions, $actual_actions);

  // Reset the state variable to be used by future assertions.
  \Drupal::state()
    ->delete('search_api_test_bulk_form');
}