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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tstoeckler created an issue. See original summary.

jalpesh’s picture

Status: Active » Needs review
FileSize
678 bytes

I have attach a patch to change @cover from getCanonicalRoute to getCollectionRoute.

tstoeckler’s picture

Status: Needs review » Reviewed & tested by the community

Yay, thanks!

Sadly, we don't have automated coverage reports, but I verified locally, that the method is now correctly (and completely!) covered.

  • webchick committed 8211126 on 8.2.x
    Issue #2773197 by jalpesh, tstoeckler: DefaultHtmlRouteProviderTest::...
webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed 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.

tstoeckler’s picture

Yup, the method was just recently added to 8.2.x.

Thanks!

  • webchick committed a470bc0 on 8.2.x
    Issue #2773197 by jalpesh, tstoeckler: DefaultHtmlRouteProviderTest::...

  • xjm committed db8849d on 8.2.x
    Revert "Issue #2773197 by jalpesh, tstoeckler:...
xjm’s picture

Note the revert is just from another issue accidentally being committed with this issue's commit message; this issue is also still fixed.

  • webchick committed 8211126 on 8.3.x
    Issue #2773197 by jalpesh, tstoeckler: DefaultHtmlRouteProviderTest::...
  • webchick committed a470bc0 on 8.3.x
    Issue #2773197 by jalpesh, tstoeckler: DefaultHtmlRouteProviderTest::...
  • xjm committed db8849d on 8.3.x
    Revert "Issue #2773197 by jalpesh, tstoeckler:...

  • webchick committed 8211126 on 8.3.x
    Issue #2773197 by jalpesh, tstoeckler: DefaultHtmlRouteProviderTest::...
  • webchick committed a470bc0 on 8.3.x
    Issue #2773197 by jalpesh, tstoeckler: DefaultHtmlRouteProviderTest::...
  • xjm committed db8849d on 8.3.x
    Revert "Issue #2773197 by jalpesh, tstoeckler:...

Status: Fixed » Closed (fixed)

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