You are here

protected function ViewsListingTest::filterVisibleElements in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views_ui/tests/src/FunctionalJavascript/ViewsListingTest.php \Drupal\Tests\views_ui\FunctionalJavascript\ViewsListingTest::filterVisibleElements()
  2. 10 core/modules/views_ui/tests/src/FunctionalJavascript/ViewsListingTest.php \Drupal\Tests\views_ui\FunctionalJavascript\ViewsListingTest::filterVisibleElements()

Removes any non-visible elements from the passed array.

Parameters

array $elements:

Return value

array

1 call to ViewsListingTest::filterVisibleElements()
ViewsListingTest::testFilterViewsListing in core/modules/views_ui/tests/src/FunctionalJavascript/ViewsListingTest.php
Tests the filtering on the Views listing page.

File

core/modules/views_ui/tests/src/FunctionalJavascript/ViewsListingTest.php, line 139

Class

ViewsListingTest
Tests the JavaScript filtering on the Views listing page.

Namespace

Drupal\Tests\views_ui\FunctionalJavascript

Code

protected function filterVisibleElements($elements) {
  $elements = array_filter($elements, function ($element) {
    return $element
      ->isVisible();
  });
  return $elements;
}