Problem/Motivation

In tests, the @group annotation is not used consistently. For example, in the ubercart module some tests use @group twice and some once.

./modules/ubercart/tests/src/Kernel/Migrate/d6/StoreTest.php: * @group commerce_migrate
./modules/ubercart/tests/src/Kernel/Migrate/d6/StoreTest.php: * @group commerce_migrate_ubercart6

/modules/ubercart/tests/src/Kernel/Migrate/d6/MigrateProductAttributeValueTest.php: * @group commerce_migrate

The PHPUnit file structure, namespace, and required metadata handbook page has this: "Group: Generated from the @group PHPDoc annotation. Every test class MUST specify at least one (first) @group that matches the originating module short name (or Drupal core component name)."
That is all I could find.

Proposed resolution

How about using an @group for commerce_migrate and one for the sub modules. Like this,

@group commerce_migrate
@group commerce_migrate_commerce

Remaining tasks

Do it.

User interface changes

N/A

API changes

N/A

Data model changes

N/A

CommentFileSizeAuthor
#2 consistent_use_of-2903078-2.patch18.65 KBBramDriesen
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quietone created an issue. See original summary.

BramDriesen’s picture

Status: Active » Needs review
FileSize
18.65 KB

Something like this perhaps?

heddn’s picture

Status: Needs review » Reviewed & tested by the community

I did a quick review. All looks good here.

  • heddn committed 24dafc0 on 8.x-2.x authored by BramDriesen
    Issue #2903078 by BramDriesen, quietone, heddn: Consistent use of @group...
heddn’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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