When one runs PHP_CodeSniffer with the Drupal standard against the migrate module, one gets a number of false sniffs like:

Separate the @expectedException and @expectedExceptionMessage sections by a blank line.
(Drupal.Commenting.DocComment.TagGroupSpacing)

Separate the @group and @coversDefaultClass sections by a blank line.
(Drupal.Commenting.DocComment.TagGroupSpacing)

Separate the @covers and @expectedException sections by a blank line.
(Drupal.Commenting.DocComment.TagGroupSpacing)

My understanding is that no blank required in each of the above cases.

Comments

Lars Toomre created an issue. See original summary.

lars toomre’s picture

The class docblock for migrate/src/Tests/MigrationTest.php is:

/**
 * Tests the migration entity.
 *
 * @group migrate
 * @coversDefaultClass \Drupal\migrate\Entity\Migration
 */
class MigrationTest extends KernelTestBase {

We are getting a false positive for the two directives in a row without a blank line in between. I am not sure if we have a standard on the order of these directives within test classes. This issue came up while working on #2624914: Fixes to migrate/src/Tests/*.php files.

klausi’s picture