diff -u b/core/modules/filter/src/FilterFormatInterface.php b/core/modules/filter/src/FilterFormatInterface.php --- b/core/modules/filter/src/FilterFormatInterface.php +++ b/core/modules/filter/src/FilterFormatInterface.php @@ -88,7 +88,7 @@ * Removes a filter. * * @param string $instance_id - * The ID of a filter plugin to be removed + * The ID of a filter plugin to be removed. */ public function removeFilter($instance_id); only in patch2: unchanged: --- a/core/modules/filter/src/Tests/FilterAPITest.php +++ b/core/modules/filter/src/Tests/FilterAPITest.php @@ -386,4 +386,23 @@ public function assertFilterFormatViolation(ConstraintViolationListInterface $vi } $this->assertTrue($filter_format_violation_found, format_string('Validation violation for invalid value "%invalid_value" found', array('%invalid_value' => $invalid_value))); } + + /** + * Tests that dependency removal works. + * + * Uninstalling a module that provides a filter should not remove a filter + * format that uses the filter. + */ + public function testDependencyRemoval() { + $filter_format = entity_load('filter_format', 'filtered_html'); + $filter_config = array( + 'weight' => 10, + 'status' => 1, + ); + $filter_format->setFilterConfig('filter_test_restrict_tags_and_attributes', $filter_config); + $filter_format->save(); + $this->uninstallModule('filter_test'); + $filter_format = entity_load('filter_format', 'filtered_html'); + $this->assertEqual('Drupal\filter\Entity\FilterFormat', get_class($filter_format)); + } }