Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
plugin system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
5 Sep 2014 at 11:31 UTC
Updated:
6 Oct 2014 at 11:30 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
marcvangend...and the patch.
Comment #2
xanoThis actually applies to any plugin type of which a plugin has a non-existing class defined as its deriver. This simple check can save a lot of time.
RTBC if the tests pass.
Comment #3
dawehnerThis looks great, but yeah let's ensure that we expand the test coverage, see DerivativeDiscoveryDecoratorTest
Comment #4
marcvangendThanks dawehner.
Here's a new patch which adds a test. That said: I'm not quite sure how useful it actually is. The initial patch merely switches between error messages. The tests now check twice for the same exception, but it doesn't test if the right message is returned in each situation.
Comment #5
dawehnerAfaik it would be great to also use @expectedExceptionMessage just to be sure.
Comment #6
marcvangendNew patch. I added @expectedExceptionMessage to both derivative discovery exception tests.
While I was at it, I also:
- made the exception messages more consistent (both end with a period now);
- changed "non existing" to "non existent" because that seems a more common phrase in both Drupal core and the internet as a whole.
Comment #7
dawehnerThank you!
Comment #8
alexpottCommitted 2c35927 and pushed to 8.0.x. Thanks!