Problem/Motivation

Our naming conventions for OO code state:

Test classes only need to be unambiguous within the context of the module they are testing.

However, we have both of:
Drupal\system\Tests\Routing\RouterTest
and
Drupal\system\Tests\Menu\RouterTest

This wasted hours upon hours of my time because I somehow repeatedly misread the namespace.

Proposed resolution

Even though both classes technically are acceptable given our coding standards, the fact that they both belong to the same module is very confusing, and it can't hurt to give one or both classes more specific names.

CommentFileSizeAuthor
#1 rename-router-test-1874470-1.patch886 byteskim.pepper
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kim.pepper’s picture

Status: Active » Needs review
FileSize
886 bytes

Renamed Drupal\system\Tests\Menu\RouterTest to Drupal\system\Tests\Menu\MenuRouterTest

xjm’s picture

Status: Needs review » Reviewed & tested by the community

That works.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.x, thanks!

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

Anonymous’s picture

Issue summary: View changes

Updated issue summary.