You are here

protected function ExposedFormTest::assertIds in Zircon Profile 8

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

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

Parameters

int[] $ids: The ids to check.

Return value

bool TRUE if ids match, FALSE otherwise.

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

File

core/modules/views/src/Tests/Plugin/ExposedFormTest.php, line 264
Contains \Drupal\views\Tests\Plugin\ExposedFormTest.

Class

ExposedFormTest
Tests exposed forms functionality.

Namespace

Drupal\views\Tests\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;
  }
  return $this
    ->assertIdentical($ids, $actual_ids);
}