/**
* @covers ::media_form_filter_format_add_form_alter
* @dataProvider providerTestValidations
*/
public function testValidationWhenAdding($filter_html_status,
$filter_align_status,
$filter_caption_status,
$filter_html_image_secure_status,
$media_embed,
$allowed_html,
$expected_error_message) { $this->
drupalGet('admin/config/content/formats/add'
);
// Enable the `filter_html` and `media_embed` filters.
$page =
$this->
getSession()->
getPage();
$page->
fillField('name', 'Another test format'
);
$this->
showHiddenFields();
$page->
findField('format'
)->
setValue('another_media_embed_test'
);
if ($filter_html_status) { $page->
checkField('filters[filter_html][status]'
);
} if ($filter_align_status) { $page->
checkField('filters[filter_align][status]'
);
} if ($filter_caption_status) { $page->
checkField('filters[filter_caption][status]'
);
} if ($filter_html_image_secure_status) {