Problem/Motivation

type the following from the root directory

  cd core
  phpunit --coverage-html html --verbose --bootstrap tests/bootstrap.php 

Please note the error only shows with the --coverage-html option enabled.
As of today there are two error relating to outdated @cover statements. One is in the path module.

1) Drupal\Tests\Core\Entity\EntityUrlTest::testGetSystemPath
PHP_CodeCoverage_Exception: Trying to @cover not existing method "\Drupal\Core\Entity\Entity::getPathByAlias".

2) Drupal\path\Tests\Field\PathFieldDefinitionTest::testGetColumns
PHP_CodeCoverage_Exception: Trying to @cover not existing method "\Drupal\path\Plugin\Field\FieldType\PathItem::getSchema".

Proposed resolution

Update the @covers statement to relate to the correct method under test.

Remaining tasks

none

User interface changes

none

API changes

none

Comments

martin107’s picture

Issue summary: View changes
dawehner’s picture

Status: Needs review » Needs work
+++ b/core/modules/path/tests/src/Field/PathFieldDefinitionTest.php
@@ -49,7 +49,7 @@ protected function getModuleAndPath() {
-   * @covers \Drupal\path\Plugin\Field\FieldType\PathItem::getSchema
+   * @covers \Drupal\path\Plugin\Field\FieldType\PathItem::Schema

this should be lowercase

martin107’s picture

Status: Needs work » Needs review
StatusFileSize
new721 bytes
new718 bytes

Fixed.

interdiff is almost the same size as the patch. :-)

PS Also the incorrect "Schema" made the error go away ... is @covers case insensitive!

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Ha!

jhodgdon’s picture

Status: Reviewed & tested by the community » Fixed

Thanks! Committed to 8.x.

tstoeckler’s picture

Oops, thanks. That was on my watch...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.