Active
Project:
Drupal core
Version:
main
Component:
plugin system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
27 Jul 2013 at 23:15 UTC
Updated:
14 Jul 2025 at 15:19 UTC
Jump to comment: Most recent
Comments
Comment #1
berdirBefore we do this, we should convert the existing tests to PHPUnit I think. That will increase the test coverage already, by a lot. There is also a bunch of classes that aren't touched at all yet, so the actual coverage of that component is much lower ;)
The test conversion however, is going to be blocked by a bunch of things.. Non-injected decorators like Cache (which is being replaced with the default plugin manager) and a very fun one: @Translation, which calls t(). Maybe that can call the service now and we can do some tricks with injection a container into Drupal...
Comment #2
jhedstromComment #3
yesct commented#1938068: Convert UnitTestBase to PHPUnit is fixed now.
we can come back to this to see what needs to be done.
Comment #4
mile23I thought I'd start on this.
I ended up testing Drupal\Core\Plugin by accident. :-)
Here's the issue: #2368019: Expand unit testing for Drupal\Core\Plugin\Context\ContextDefinition
Comment #5
mile23Here's one in the proper namespace: #2368585: Expand unit testing for Drupal\Component\Plugin\ContextAwarePluginBase
Comment #6
mile23Again with the tests! #2370183: Expand unit testing for Drupal\Component\Plugin\Discovery\DiscoveryTrait
Comment #7
mile23And... #2371531: Expand unit testing for Drupal\Component\Plugin\PluginManagerBase
Comment #8
mile23Comment #9
mile23The hits just keep on coming. #2375737: Expand unit testing for Drupal\Component\Plugin\Factory\ReflectionFactory
Comment #10
mile23Comment #11
mile23Comment #12
mile23Found a bug. #2380029: Drupal\Component\Plugin\Derivative\DeriverBase is designed to error out.
Comment #13
duaelfrI ran all the tests except the last one and made comments mainly about coding standards because the code seemed good to me.
Good job @Mile23!
Comment #14
mile23Comment #15
dawehner.
Comment #29
smustgrave commentedIs this one still relevant?