Problem/Motivation

A syslog test module has a non-test class ending in Test, which can trigger a phpunit warning

Steps to reproduce

Run tests on the core/modules/syslog directory

Proposed resolution

Rename the class

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3565581

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mfb created an issue. See original summary.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Seems fine to me.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to main and 11.x, thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • catch committed f656bd58 on main
    fix: #3565581 Non-test class ending in Test triggers phpunit warning
    
    By...

  • catch committed 9705731e on 11.x
    fix: #3565581 Non-test class ending in Test triggers phpunit warning
    
    By...
jonathan1055’s picture

It's good to get this fixed. There is a coding standard issue open for Traits to also follow proper endings, which is ready for agreement
#3521443: Traits should always have the suffix "Trait"

In that issue, there is the three-part rule for suffixes:

  • Interfaces should always have the suffix "Interface". Accordingly, non-interfaces should never have the suffix "Interface".
  • Traits should always have the suffix "Trait". Accordingly, non-traits should never have the suffix "Trait".
  • Test classes should always have the suffix "Test". Accordingly, non-tests should never have the suffix "Test".

Status: Fixed » Closed (fixed)

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