Problem/Motivation

\Drupal\FunctionalTests\Core\Config\SchemaConfigListenerTest Makes no HTTP requests but is a functional test. This is correct because it is asserting that Functional tests have schema checking turned on by default.

Proposed resolution

Fix the comment to say what the test actual does.

Remaining tasks

None

User interface changes

N/a

API changes

N/a

Data model changes

N/a

Release notes snippet

N/a

Issue fork drupal-3415161

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mstrelan created an issue. See original summary.

mstrelan’s picture

We already have an equivalent Kernel test for this. See \Drupal\KernelTests\Core\Config\SchemaConfigListenerTest. It seems this is supposed to remain a Functional test. But we should update this comment for clarity:

- * Tests the functionality of ConfigSchemaChecker in KernelTestBase tests.
+ * Tests the functionality of ConfigSchemaChecker in BrowserTestBase tests.

#2553733: BrowserTestBase should be adding the config schema checker like WebTestBase

spokje’s picture

The comment change is a win no matter what.

However, I have _no_ clue how this and its KernelTest sibling are testing the config schemas, since that logic was changed in #2625212: Add ConfigSchemaChecker to development.services.yml.
FYI: I often have _no_ clue and need to be explained what's going on.

I'll ping @alexpott and/or other core committers to get that explanation and maybe it's worth adding that to both the tests so this is clear once and for all?

EDIT: Even more "interesting", #2625212 has a commit 19006b5e and a rollback c346599b, but that rollback only reverted one out of the 14 changed files...

mstrelan’s picture

Can I join the clueless club?

spokje’s picture

Can I join the clueless club?

Well, we as a club have no clue on what rules apply to becoming a member, so hop on in! ;)

alexpott’s picture

Title: Convert SchemaConfigListenerTest into a Kernel test » Fix \Drupal\FunctionalTests\Core\Config\SchemaConfigListenerTest comment
Category: Task » Bug report
Issue summary: View changes
Status: Active » Reviewed & tested by the community
Issue tags: -Test suite performance

The change in the MR is correct.

And yes this test is testing something. Add the following code to the class and you will see it fail.

  protected $strictConfigSchema = FALSE;

The test is in \Drupal\Tests\Traits\Core\Config\SchemaConfigListenerTestTrait so that the Kernel and Functional tests can share.

  • catch committed 491d634c on 10.2.x
    Issue #3415161 by mstrelan, Spokje, alexpott: Fix \Drupal\...

  • catch committed 7daf50fa on 11.x
    Issue #3415161 by mstrelan, Spokje, alexpott: Fix \Drupal\...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.x and cherry-picked to 10.2.x, thanks!

Status: Fixed » Closed (fixed)

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