function AssertLegacyTrait::assertOption
Same name in other branches
- 9 core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php \Drupal\FunctionalTests\AssertLegacyTrait::assertOption()
Asserts that a select option in the current page exists.
Parameters
string $id: ID of select field to assert.
string $option: Option to assert.
Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->optionExists() instead.
12 calls to AssertLegacyTrait::assertOption()
- BlockContentCreationTest::testBlockContentCreationMultipleViewModes in core/
modules/ block_content/ tests/ src/ Functional/ BlockContentCreationTest.php - Creates a "Basic page" block with multiple view modes.
- BookTest::testGetTableOfContents in core/
modules/ book/ tests/ src/ Functional/ BookTest.php - Tests BookManager::getTableOfContents().
- BrowserTestBaseTest::testFieldAssertsForOptions in core/
tests/ Drupal/ FunctionalTests/ BrowserTestBaseTest.php - Tests legacy field asserts for options field type.
- BulkFormTest::testBulkForm in core/
modules/ user/ tests/ src/ Functional/ Views/ BulkFormTest.php - Tests the user bulk form.
- BulkFormTest::testBulkForm in core/
modules/ views/ tests/ src/ Functional/ BulkFormTest.php - Tests the bulk form.
File
-
core/
tests/ Drupal/ FunctionalTests/ AssertLegacyTrait.php, line 452
Class
- AssertLegacyTrait
- Provides convenience methods for assertions in browser tests.
Namespace
Drupal\FunctionalTestsCode
protected function assertOption($id, $option) {
return $this->assertSession()
->optionExists($id, $option);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.