protected function FormatterConfigurationTest::updateFormatterSettings in Video Embed Field 8.2
Same name and namespace in other branches
- 8 tests/src/Functional/FormatterConfigurationTest.php \Drupal\Tests\video_embed_field\Functional\FormatterConfigurationTest::updateFormatterSettings()
Update the settings for the current formatter.
Parameters
array $settings: The settings to update the foramtter with.
1 call to FormatterConfigurationTest::updateFormatterSettings()
- FormatterConfigurationTest::testVideoConfirmationForm in tests/
src/ Functional/ FormatterConfigurationTest.php - Test the formatter configuration forms.
File
- tests/
src/ Functional/ FormatterConfigurationTest.php, line 118
Class
- FormatterConfigurationTest
- Tests the field formatter configuration forms.
Namespace
Drupal\Tests\video_embed_field\FunctionalCode
protected function updateFormatterSettings($settings) {
$edit = [];
foreach ($settings as $key => $value) {
$edit["fields[{$this->fieldName}][settings_edit_form][settings][{$key}]"] = $value;
}
$this
->drupalGet($this->manageDisplay);
$this
->find('input[name="' . $this->fieldName . '_settings_edit"]')
->click();
$this
->submitForm($edit, $this->fieldName . '_plugin_settings_update');
$this
->submitForm([], t('Save'));
}