protected function WebformAssertLegacyTrait::assertOption in Webform 6.x
Same name and namespace in other branches
- 8.5 tests/src/Traits/WebformAssertLegacyTrait.php \Drupal\Tests\webform\Traits\WebformAssertLegacyTrait::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.
2 calls to WebformAssertLegacyTrait::assertOption()
- WebformFieldTest::testWebformField in tests/
src/ Functional/ Field/ WebformFieldTest.php - Tests the webform (entity reference) field.
- WebformVariantOperationsTest::testVariantOperations in tests/
src/ Functional/ Variant/ WebformVariantOperationsTest.php - Test variant operation.
File
- tests/
src/ Traits/ WebformAssertLegacyTrait.php, line 422
Class
- WebformAssertLegacyTrait
- Provides convenience methods for assertions in browser tests.
Namespace
Drupal\Tests\webform\TraitsCode
protected function assertOption($id, $option) {
return $this
->assertSession()
->optionExists($id, $option);
}