Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
The @covers
annotation in \Drupal\Tests\Core\Entity\Routing\DefaultHtmlRouteProviderTest::testGetCollectionRoute() is incorrect.
This leads to less code coverage being reported than we actually have as is shown by the attached screenshot (although, admittedly the color scheme makes it hard to identify).
Proposed resolution
Change @covers
in \Drupal\Tests\Core\Entity\Routing\DefaultHtmlRouteProviderTest::testGetCollectionRoute() to ::getCollectionRoute
.
Remaining tasks
Write patch.
User interface changes
None.
API changes
None.
Data model changes
None.
Comment | File | Size | Author |
---|---|---|---|
#2 | change-cover_2773197.patch | 678 bytes | jalpesh |
get-collection-route.png | 49.08 KB | tstoeckler |
Comments
Comment #2
jalpesh CreditAttribution: jalpesh as a volunteer and at Cybage Software Pvt Ltd. commentedI have attach a patch to change @cover from getCanonicalRoute to getCollectionRoute.
Comment #3
tstoecklerYay, thanks!
Sadly, we don't have automated coverage reports, but I verified locally, that the method is now correctly (and completely!) covered.
Comment #5
webchickCommitted and pushed to 8.2.x. Thanks!
This didn't cherry-pick into 8.1.x. I checked and couldn't find the method in the same file, so assuming that's correct.
Comment #6
tstoecklerYup, the method was just recently added to 8.2.x.
Thanks!
Comment #9
xjmNote the revert is just from another issue accidentally being committed with this issue's commit message; this issue is also still fixed.