You are here

protected function ExposedFormTest::assertIds in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php \Drupal\Tests\views\Functional\Plugin\ExposedFormTest::assertIds()

Checks whether the specified ids are the ones displayed in the view output.

Parameters

int[] $ids: The ids to check.

1 call to ExposedFormTest::assertIds()
ExposedFormTest::testExposedSortAndItemsPerPage in core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php
Tests exposed forms with exposed sort and items per page.

File

core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php, line 418

Class

ExposedFormTest
Tests exposed forms functionality.

Namespace

Drupal\Tests\views\Functional\Plugin

Code

protected function assertIds(array $ids) {
  $elements = $this
    ->cssSelect('div.view-test-exposed-form-sort-items-per-page div.views-row span.field-content');
  $actual_ids = [];
  foreach ($elements as $element) {
    $actual_ids[] = (int) $element
      ->getText();
  }
  $this
    ->assertSame($ids, $actual_ids);
}