Problem/Motivation
This issue #2350551: Views fields that have attached assets are lost when Views output caching is enabled introduced a bug into unit test @cover annotations.
+++ b/core/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php
@@ -0,0 +1,117 @@
+/**
+ * @coversDefaultClass \Drupal\Core\Render\BubbleableMetadata
+ * @group Render
+ */
+class BubbleableMetadataTest extends UnitTestCase {
+
+ /**
+ * @covers ::apply
+ * @dataProvider providerTestApply
+ */
+ public function testApply(BubbleableMetadata $metadata, array $render_array, array $expected) {
There's no such method as BubbleableMetadata::apply(), so the @cover annotation is incorrect and I can't make a coverage report.
Proposed resolution
Fix the annotation.
Remaining tasks
User interface changes
API changes
Comments
Comment #1
mile23Comment #2
mile23How about a patch?
Comment #3
wim leersThanks for catching that, and fixing it!
I wish PHPUnit always reported problems like this :(
Comment #4
mile23Yeah, wouldn't that be great? #2415441: Automate finding @covers errors
Comment #5
alexpottTest only changes are not subject to beta evaluation. Committed 180add7 and pushed to 8.0.x. Thanks!