Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
phpunit
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Jan 2015 at 05:38 UTC
Updated:
26 Jan 2015 at 17:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
mile23As always, you can check this by generating a coverage report. Note that this could take some time.
Comment #2
daffie commentedI agree with you that "@covers ::getBins" is wrong. But what is wrong is not completely clear to me. Did they mean "@covers ::getInvalidatorCacheBins"? The problem is that I cannot find any test coverage for the function getInvalidatorCacheBins(). So removing the line with "@covers ::getBins" is the right thing to do.
BTW: There are no test-assertion in the test-class for anything :(
Comment #3
dawehnerSo, it has all kind of checks via mocks, I don't consider this as a problem.
Is it just me that I hate having to maintain @covers annotations? It couples your test a lot to your internal structure of the code.
Comment #4
mile23It's what happens when you allow multiple
@coversper test method. If you make a proper unit test, you're *only* covering *one* method. That way it's completely clear what has happened, and if you remove the method being tested, you're likely to remove the test method as well.Also, the fact that we use
@coversas documentation means that we should always have the testbot generate a report, or at least check coverage in some way, so that we know it's correct.Comment #5
alexpottCommitted c9b8b83 and pushed to 8.0.x. Thanks!