Problem/Motivation

Link module unit tests are never run because they are not discovered by the PHPUnit engine.

Steps to reproduce

  1. Go to your Drupal root
  2. $ cd core
  3. $ ./vendor/bin/phpunit --group Link

Obtained result (before)

Expected result (after)

Proposed resolution

Move that tests in the right namespace so they can be run.

Before:

namespace Drupal\Tests\link\Plugin\Validation\Constraint;

After:

namespace Drupal\Tests\link\Unit\Plugin\Validation\Constraint;

Remaining tasks

Contributor tasks needed
Task Novice task? Contributor instructions Complete?
Create a patch Instructions Done
Update the issue summary Instructions Done
Update the issue summary noting if allowed during the beta Instructions Done
Add steps to reproduce the issue Novice Instructions Done
Embed before and after screenshots in the issue summary Novice Instructions Done

User interface changes

None.

API changes

None.

Data model changes

None.

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue category Bug because tests are so important that we do not want them to be ignored
Issue priority Major because tests make the application more stable
Unfrozen changes Unfrozen because it only changes tests. (All the link module tests)

Comments

DuaelFr created an issue. See original summary.

duaelfr’s picture

Issue summary: View changes
StatusFileSize
new3.11 KB
new7.79 KB
new8.75 KB
duaelfr’s picture

Issue summary: View changes
Status: Active » Needs review
chx’s picture

Status: Needs review » Reviewed & tested by the community

*shakes head*

Please file a followup where we explore how could we avoid this. (Possibly also avoid the "test" name in the classname. the @group annotation should be enough.)

duaelfr’s picture

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.0.x, thanks!

  • catch committed 3dbe7ed on 8.0.x
    Issue #2575559 by DuaelFr: Link unit tests never run because defined in...

Status: Fixed » Closed (fixed)

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