protected function WebTestExtended::checkExpectedRadioOptions in Scheduled Updates 8
Utility function to check that a radio group has only the expected options.
Parameters
string $name: The field name.
array $expected_options: The expected options.
array $unexpected_options: The unexpected options.
1 call to WebTestExtended::checkExpectedRadioOptions()
- ScheduledUpdatesTestBase::checkRunnersAvailable in tests/
src/ FunctionalJavascript/ ScheduledUpdatesTestBase.php - Check that a set of runner plugins are on form and no extras.
File
- tests/
src/ FunctionalJavascript/ WebTestExtended.php, line 133 - Contains \Drupal\Tests\scheduled_updates\WebTestExtended.
Class
- WebTestExtended
- BrowserTestBase plus project agnostic helper functions.
Namespace
Drupal\Tests\scheduled_updates\FunctionalJavascriptCode
protected function checkExpectedRadioOptions($name, $expected_options, $unexpected_options = []) {
foreach ($expected_options as $expected_option) {
$this
->assertFieldByName($name, $expected_option);
}
foreach ($unexpected_options as $unexpected_option) {
$this
->assertNoFieldByName($name, $unexpected_option);
}
}