Problem/Motivation
Part of the unfolding saga of #2052109: [meta] Expand phpunit tests for \Drupal\Component\Plugin classes
In this issue we cover StaticDiscoveryDecorator, which is the last of the Component\Plugin classes without unit tests (in HEAD or patched in issues).
Proposed resolution
Remaining tasks
User interface changes
API changes
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | interdiff.txt | 2.75 KB | mile23 |
| #4 | 2379419_4.patch | 8.57 KB | mile23 |
Comments
Comment #1
mile23Patch covers all methods other than
__construct().Comment #2
mile23Some formatting and coding standards changes.
Comment #3
duaelfr89/89 tests PASS
Coverage:
There are a few comments to make it better:
Unused.
Typo in "registeredDefintionCallback" that might be spelled "registeredDefinitionCallback".
Comment #4
mile23Thanks!
Got rid of the extra
use.Fixed the typo, and changed the name(s) to match the name of the property.
Also I discovered I hadn't finished the docblock for one of the data providers.
Try again...
Comment #5
duaelfrTests PASS
Coverage:
About the __call coverage I found a PhpUnit issue but I tried
StaticDiscoveryDecorator::__call,Drupal\Component\Plugin\Discovery\StaticDiscoveryDecorator::__calland\Drupal\Component\Plugin\Discovery\StaticDiscoveryDecorator::__callwithout success.As __call is a one line method and as the given test pass, we could consider it 100% covered.
It seems that __construct is not always tested and this class constructor is really simple so I don't think we must test it.
So, for me it's RTBC!
Comment #6
mile23Want to set the status?
Comment #7
duaelfrForgot this one ;)
Thanks.
Comment #10
daffie commentedBack to RTBC. The f**king testbot again!
Comment #11
webchickNot really the most qualified to give these sign-off, but they've been sitting here long enough for someone to raise objections, and moar test coverage is never a bad thing.
Committed and pushed to 8.0.x. Thanks!