Explicitly skip @requires module in PHPUnit Kernel and Browser tests

Created on 18 May 2016, about 8 years ago
Updated 13 September 2023, 10 months ago

Follow-up to #2722731: Mark MissingDependentModuleUnitTest as incomplete
Follow-up to #2721355: MissingDependentModuleUnitTest has the wrong namespace

Problem/Motivation

This will I assume be expected functionality for feature parity coming from simpletest unit tests. This is related to 📌 Implement @requires and @dependencies within TestBase, mark tests as skipped Closed: outdated but implements the phpunit side only and fulfills the existing @todo in KernelTestBase.

Proposed resolution

Use @requires module modulename annotation at the class level and also at the test method level.

Disallow TestDiscovery from discarding tests that are annotated in this way.

Tests annotated this way will scan for the module on the filesystem and mark the test as skipped if the module is not present.

Remaining tasks

User interface changes

API changes

Does not change the API, but alters its behavior to make @require dependencies explicit.

Change record: https://www.drupal.org/node/2857979

Data model changes

📌 Task
Status

Fixed

Version

8.4 ⚰️

Component
Simpletest 

Last updated 16 days ago

Created by

🇺🇸United States neclimdul Houston, TX

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024