Problem/Motivation

The \Drupal\Tests\filter\Kernel\FilterSettingsTest test assumes that default filters are added to filter formats when saved. They are not.

The saving of default filter configuration to filter formats on creation was removed in #1868772: Convert filters to plugins - see the changes to core/modules/filter/lib/Drupal/filter/FilterFormatStorageController.php - note file was removed in #1893772: Move entity-type specific storage logic into entity classes.

This is critical because it blocks #3059332: Mark kernel tests that perform no assertions as risky

Proposed resolution

Remove the test.

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

N/a

CommentFileSizeAuthor
#2 3059543-2.patch2.13 KBalexpott
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Priority: Normal » Critical
FileSize
2.13 KB
alexpott’s picture

Status: Active » Needs review
alexpott’s picture

  1. +++ /dev/null
    @@ -1,62 +0,0 @@
    -    foreach ($filter_defaults_format->filters() as $name => $filter) {
    

    Note $filter_defaults_format->filters() returns an empty array. Always.

  2. +++ /dev/null
    @@ -1,62 +0,0 @@
    -    // Reload it from scratch.
    -    filter_formats_reset();
    

    We're reloading nothing here.

alexpott’s picture

Issue summary: View changes

Updated the issue summary with more information about why this test is redundant.

alexpott’s picture

Issue summary: View changes
Lendude’s picture

Status: Needs review » Reviewed & tested by the community

@alexpott thanks for the clear reasoning on this, looks to go me, hard to pick nits in only deletions :)

larowlan’s picture

Status: Reviewed & tested by the community » Fixed

Committed e55c9fe and pushed to 8.8.x. Thanks!

  • larowlan committed e55c9fe on 8.8.x
    Issue #3059543 by alexpott: Remove \Drupal\Tests\filter\Kernel\...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.