protected function FieldWebTest::clickSortLoadIdsFromOutput

Small helper function to get all ids in the output.

Return value

array A list of beatle ids.

1 call to FieldWebTest::clickSortLoadIdsFromOutput()
FieldWebTest::testClickSorting in drupal/core/modules/views/lib/Drupal/views/Tests/Handler/FieldWebTest.php
Tests the click sorting functionality.

File

drupal/core/modules/views/lib/Drupal/views/Tests/Handler/FieldWebTest.php, line 81
Contains \Drupal\views\Tests\Handler\FieldWebTest.

Class

FieldWebTest
Tests fields from within a UI.

Namespace

Drupal\views\Tests\Handler

Code

protected function clickSortLoadIdsFromOutput() {
  $fields = $this
    ->xpath("//td[contains(@class, 'views-field-id')]");
  $ids = array();
  foreach ($fields as $field) {
    $ids[] = (int) $field[0];
  }
  return $ids;
}