You are here

protected function AssertLegacyTrait::getAllOptions in Drupal 9

Same name and namespace in other branches
  1. 8 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 988

Class

AssertLegacyTrait
Provides convenience methods for assertions in browser tests.

Namespace

Drupal\FunctionalTests

Code

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');
}