Issue #3359179 by Spokje: Fix PHPStan L1 errors "@coversDefaultClass defined on class method foo."

merge-requests/4235/head
Dave Long 2023-06-22 14:13:38 +01:00
parent cc97afe40d
commit 67bad1b36c
No known key found for this signature in database
GPG Key ID: ED52AE211E142771
4 changed files with 3 additions and 18 deletions

View File

@ -326,7 +326,7 @@ class MenuLinksTest extends KernelTestBase {
/**
* Tests handling of pending revisions.
*
* @coversDefaultClass \Drupal\menu_link_content\Plugin\Validation\Constraint\MenuTreeHierarchyConstraintValidator
* @covers \Drupal\menu_link_content\Plugin\Validation\Constraint\MenuTreeHierarchyConstraintValidator::validate
*/
public function testPendingRevisions() {
/** @var \Drupal\Core\Entity\RevisionableStorageInterface $storage */

View File

@ -112,7 +112,7 @@ class WorkspaceAccessTest extends KernelTestBase {
}
/**
* @coversDefaultClass \Drupal\workspaces\Plugin\EntityReferenceSelection\WorkspaceSelection
* @covers \Drupal\workspaces\Plugin\EntityReferenceSelection\WorkspaceSelection::getReferenceableEntities
*/
public function testWorkspaceSelection() {
$own_permission_user = $this->createUser(['view own workspace']);

View File

@ -1465,11 +1465,6 @@ parameters:
count: 1
path: modules/menu_link_content/src/Plugin/Menu/MenuLinkContent.php
-
message: "#^@coversDefaultClass defined on class method testPendingRevisions\\.$#"
count: 1
path: modules/menu_link_content/tests/src/Kernel/MenuLinksTest.php
-
message: "#^Call to deprecated constant REQUEST_TIME\\: Deprecated in drupal\\:8\\.3\\.0 and is removed from drupal\\:11\\.0\\.0\\. Use \\\\Drupal\\:\\:time\\(\\)\\-\\>getRequestTime\\(\\); $#"
count: 2
@ -2640,11 +2635,6 @@ parameters:
count: 1
path: modules/workspaces/src/WorkspacePublisher.php
-
message: "#^@coversDefaultClass defined on class method testWorkspaceSelection\\.$#"
count: 1
path: modules/workspaces/tests/src/Kernel/WorkspaceAccessTest.php
-
message: "#^Variable \\$keyed_content might not be defined\\.$#"
count: 1
@ -2840,11 +2830,6 @@ parameters:
count: 1
path: tests/Drupal/Tests/Component/Plugin/Factory/ReflectionFactoryTest.php
-
message: "#^@coversDefaultClass defined on class method testHtmlClass\\.$#"
count: 1
path: tests/Drupal/Tests/Component/Utility/HtmlTest.php
-
message: "#^Result of static method Drupal\\\\Composer\\\\Composer\\:\\:ensureComposerVersion\\(\\) \\(void\\) is used\\.$#"
count: 1

View File

@ -90,7 +90,7 @@ class HtmlTest extends TestCase {
/**
* Tests that Html::getClass() cleans the class name properly.
*
* @coversDefaultClass ::getClass
* @covers ::getClass
*/
public function testHtmlClass() {
// Verify Drupal coding standards are enforced.