Problem/Motivation

There are two test modules that are not in the 'Testing' package.

$ git grep "package: test"
core/modules/jsonapi/tests/modules/jsonapi_response_validator/jsonapi_response_validator.info.yml:package: testing
core/modules/system/tests/modules/legacy_hook_test/legacy_hook_test.info.yml:package: test

Steps to reproduce

Proposed resolution

Change the package to 'Testing'

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3615122

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

quietone created an issue. See original summary.

quietone’s picture

Issue tags: +Novice

avinash.jha made their first commit to this issue’s fork.

kieran.cott made their first commit to this issue’s fork.

kieran.cott’s picture

Status: Active » Needs review
longwave’s picture

Maybe we could write a unit test that checks this to prevent regressions when we add new test modules.

kieran.cott’s picture

Good idea - I've added a unit test that dynamically discovers non-hidden test modules beneath core test directories and verifies each discovered module declares package: Testing.

longwave-bot made their first commit to this issue’s fork.

longwave’s picture

Thanks for adding the test! I reworked the code a bit to use ExtensionDiscovery so the discovery mechanism is the same as other module discovery, but the principle is the same.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Seems good to me

if (!str_contains($module->getPath(), '/tests/modules/')) {
        continue;
      }

While this should be standard I know the options module doesn't follow this, never knew why.

  • catch committed 56283a66 on main
    task: #3615122 Move test modules to 'Testing' package
    
    By: quietone
    By:...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to main, thanks!

Doesn't apply to 11.x, but not really sure we need a backport?

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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