Problem/Motivation

Some descriptions Test files are malformed. For example :

/**
 * @file
 * Contains Drupal\system\Tests\Form\ElementsAccessTest.
 */

Miss a \.

/**
 * @file
 * Definition of Drupal\config\Tests\ConfigEntityListMultilingualTest.
 */

Use "Definition of" instead of "Contains".

Proposed resolution

  • Add this missing \ to all tests definitions
  • use "Contains" in all tests definitions.

RC Target evaluation

Only changes comments to make them consistent. Not disruptive at all.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

GoZ created an issue. See original summary.

GoZ’s picture

Issue summary: View changes
GoZ’s picture

Title: Bad @file description in test » Bad @file description in Test files classes
GoZ’s picture

Status: Active » Needs review
FileSize
3.54 KB
DuaelFr’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
Issue tags: +rc target triage

Before:

$ grep -R '* Contains D' core/ | grep Test
core/modules/system/src/Tests/Form/ElementsAccessTest.php: * Contains Drupal\system\Tests\Form\ElementsAccessTest.
core/modules/system/src/Tests/Field/FieldSettingsTest.php: * Contains Drupal\system\Tests\Field\FieldSettingsTest.
core/modules/system/src/Tests/Field/FieldItemTest.php: * Contains Drupal\system\Tests\Field\FieldItemTest.
core/modules/node/src/Tests/NodeOwnerTest.php: * Contains Drupal\node\Tests\NodeOwnerTest.

$ grep -R '* Definition' core/ | grep Test
core/modules/system/src/Tests/Database/LargeQueryTest.php: * Definition of Drupal\system\Tests\Database\LargeQueryTest.
core/modules/config/src/Tests/ConfigEntityListMultilingualTest.php: * Definition of Drupal\config\Tests\ConfigEntityListMultilingualTest.

After:

$ grep -R '* Contains D' core/ | grep Test | wc -l
0
$ grep -R '* Definition' core/ | grep Test | wc -l
0

Comment:

With that patch applied, 28 missing leading antislash remains outside of the tests. You should open a follow-up issue or extend the scope of this one to fix them.

$ grep -R '* Contains Drupal\\' core/ | grep -v Test | wc -l
28
DuaelFr’s picture

Issue tags: -rc target triage +rc eligible

Better tagging.

xjm’s picture

Status: Reviewed & tested by the community » Fixed

Thanks @GoZ and @DuaelFr. Nice small cleanup of a few things that followed an old standard. I also double-checked the fixes locally with git diff --color-words.

Committed and pushed to 8.0.x. Thanks!

  • xjm committed 436f50f on 8.0.x
    Issue #2598840 by GoZ, DuaelFr: Bad @file description in Test files...

Status: Fixed » Closed (fixed)

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