public function AssertLegacyTraitDeprecatedTest::testGetAllOptions in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/FunctionalTests/Core/Test/AssertLegacyTraitDeprecatedTest.php \Drupal\FunctionalTests\Core\Test\AssertLegacyTraitDeprecatedTest::testGetAllOptions()
Tests getAllOptions().
@expectedDeprecation 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
File
- core/
tests/ Drupal/ FunctionalTests/ Core/ Test/ AssertLegacyTraitDeprecatedTest.php, line 27
Class
- AssertLegacyTraitDeprecatedTest
- Tests deprecated AssertLegacyTrait functionality.
Namespace
Drupal\FunctionalTests\Core\TestCode
public function testGetAllOptions() {
$this
->drupalGet('/form-test/select');
$this
->assertCount(6, $this
->getAllOptions($this
->cssSelect('select[name="opt_groups"]')[0]));
}