function PermissionFilterTest::filterVisibleElements
Same name and namespace in other branches
- 11.x core/modules/user/tests/src/FunctionalJavascript/PermissionFilterTest.php \Drupal\Tests\user\FunctionalJavascript\PermissionFilterTest::filterVisibleElements()
- 10 core/modules/user/tests/src/FunctionalJavascript/PermissionFilterTest.php \Drupal\Tests\user\FunctionalJavascript\PermissionFilterTest::filterVisibleElements()
Removes any non-visible elements from the passed array.
Parameters
\Behat\Mink\Element\NodeElement[] $elements: An array of node elements.
Return value
\Behat\Mink\Element\NodeElement[] An array of node elements.
1 call to PermissionFilterTest::filterVisibleElements()
- PermissionFilterTest::testPermissionFilter in core/
modules/ user/ tests/ src/ FunctionalJavascript/ PermissionFilterTest.php - Tests that filter results announcement has correct pluralization.
File
-
core/
modules/ user/ tests/ src/ FunctionalJavascript/ PermissionFilterTest.php, line 94
Class
- PermissionFilterTest
- Tests the JavaScript functionality of the permission filter.
Namespace
Drupal\Tests\user\FunctionalJavascriptCode
protected function filterVisibleElements(array $elements) : array {
return array_filter($elements, function (NodeElement $element) {
return $element->isVisible();
});
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.