protected function FieldTest::clickSortLoadIdsFromOutput in Views (for Drupal 7) 8.3
Small helper function to get all ids in the output.
Return value
array A list of beatle ids.
1 call to FieldTest::clickSortLoadIdsFromOutput()
- FieldTest::testClickSorting in lib/
Drupal/ views/ Tests/ Handler/ FieldTest.php - Tests the click sorting functionality.
File
- lib/
Drupal/ views/ Tests/ Handler/ FieldTest.php, line 117 - Definition of Drupal\views\Tests\Handler\FieldTest.
Class
- FieldTest
- Tests the generic field handler.
Namespace
Drupal\views\Tests\HandlerCode
protected function clickSortLoadIdsFromOutput() {
$fields = $this
->xpath("//td[contains(@class, 'views-field-id')]");
$ids = array();
foreach ($fields as $field) {
$ids[] = (int) $field[0];
}
return $ids;
}