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.
Comment | File | Size | Author |
---|---|---|---|
#1 | rename-router-test-1874470-1.patch | 886 bytes | kim.pepper |
Comments
Comment #1
kim.pepperRenamed Drupal\system\Tests\Menu\RouterTest to Drupal\system\Tests\Menu\MenuRouterTest
Comment #2
xjmThat works.
Comment #3
catchCommitted/pushed to 8.x, thanks!
Comment #4.0
(not verified) CreditAttribution: commentedUpdated issue summary.