function AssertLegacyTrait::getAllOptions
Same name in other branches
- 9 core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php \Drupal\FunctionalTests\AssertLegacyTrait::getAllOptions()
Get all option elements, including nested options, in a select.
Parameters
\Behat\Mink\Element\NodeElement $element: The element for which to get the options.
Return value
\Behat\Mink\Element\NodeElement[] Option elements in select.
Deprecated in drupal:8.5.0 and is removed from drupal:10.0.0. Use $element->findAll('xpath', 'option') instead.
See also
https://www.drupal.org/node/3129738
1 call to AssertLegacyTrait::getAllOptions()
- AssertLegacyTraitDeprecatedTest::testGetAllOptions in core/
tests/ Drupal/ FunctionalTests/ Core/ Test/ AssertLegacyTraitDeprecatedTest.php - Tests getAllOptions().
File
-
core/
tests/ Drupal/ FunctionalTests/ AssertLegacyTrait.php, line 835
Class
- AssertLegacyTrait
- Provides convenience methods for assertions in browser tests.
Namespace
Drupal\FunctionalTestsCode
protected function getAllOptions(NodeElement $element) {
@trigger_error('AssertLegacyTrait::getAllOptions() is deprecated in drupal:8.5.0 and is removed from drupal:10.0.0. Use $element->findAll(\'xpath\', \'option\') instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
return $element->findAll('xpath', '//option');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.