Issue #3351067 by Spokje: Fix PHPStan L1 errors "Class already @covers \Foo\Bar so the method @covers is redundant."

merge-requests/3739/head
catch 2023-03-29 17:24:18 +01:00
parent 63f4d1f33e
commit 821cc64ae6
4 changed files with 2 additions and 48 deletions

View File

@ -60,9 +60,6 @@ class ValidatorsTest extends KernelTestBase {
} }
/** /**
* @covers \Drupal\ckeditor5\Plugin\Validation\Constraint\ToolbarItemConstraintValidator
* @covers \Drupal\ckeditor5\Plugin\Validation\Constraint\ToolbarItemDependencyConstraintValidator
* @covers \Drupal\ckeditor5\Plugin\Validation\Constraint\EnabledConfigurablePluginsConstraintValidator
* @covers \Drupal\ckeditor5\Plugin\Validation\Constraint\CKEditor5ElementConstraintValidator * @covers \Drupal\ckeditor5\Plugin\Validation\Constraint\CKEditor5ElementConstraintValidator
* @covers \Drupal\ckeditor5\Plugin\Validation\Constraint\StyleSensibleElementConstraintValidator * @covers \Drupal\ckeditor5\Plugin\Validation\Constraint\StyleSensibleElementConstraintValidator
* @covers \Drupal\ckeditor5\Plugin\Validation\Constraint\UniqueLabelInListConstraintValidator * @covers \Drupal\ckeditor5\Plugin\Validation\Constraint\UniqueLabelInListConstraintValidator
@ -549,11 +546,6 @@ class ValidatorsTest extends KernelTestBase {
} }
/** /**
* @covers \Drupal\ckeditor5\Plugin\Editor\CKEditor5::validatePair()
* @covers \Drupal\ckeditor5\Plugin\Validation\Constraint\FundamentalCompatibilityConstraintValidator
* @covers \Drupal\ckeditor5\Plugin\Validation\Constraint\ToolbarItemConstraintValidator
* @covers \Drupal\ckeditor5\Plugin\Validation\Constraint\ToolbarItemDependencyConstraintValidator
* @covers \Drupal\ckeditor5\Plugin\Validation\Constraint\EnabledConfigurablePluginsConstraintValidator
* @covers \Drupal\ckeditor5\Plugin\Validation\Constraint\SourceEditingPreventSelfXssConstraintValidator * @covers \Drupal\ckeditor5\Plugin\Validation\Constraint\SourceEditingPreventSelfXssConstraintValidator
* @dataProvider providerPair * @dataProvider providerPair
* *

View File

@ -41,7 +41,6 @@ class WildcardHtmlSupportTest extends KernelTestBase {
/** /**
* @covers \Drupal\ckeditor5\Plugin\CKEditor5Plugin\SourceEditing::getDynamicPluginConfig() * @covers \Drupal\ckeditor5\Plugin\CKEditor5Plugin\SourceEditing::getDynamicPluginConfig()
* @covers \Drupal\ckeditor5\Plugin\CKEditor5PluginManager::getCKEditor5PluginConfig()
* @dataProvider providerGhsConfiguration * @dataProvider providerGhsConfiguration
*/ */
public function testGhsConfiguration(string $filter_html_allowed, array $source_editing_tags, array $expected_ghs_configuration, ?array $additional_toolbar_items = []): void { public function testGhsConfiguration(string $filter_html_allowed, array $source_editing_tags, array $expected_ghs_configuration, ?array $additional_toolbar_items = []): void {

View File

@ -52,7 +52,6 @@ class MediaEmbedFilterConfigurationUiTest extends MediaJavascriptTestBase {
/** /**
* @covers ::media_form_filter_format_add_form_alter * @covers ::media_form_filter_format_add_form_alter
* @covers ::media_filter_format_edit_form_validate
* @dataProvider providerTestValidations * @dataProvider providerTestValidations
*/ */
public function testValidationWhenAdding($filter_html_status, $filter_align_status, $filter_caption_status, $filter_html_image_secure_status, $media_embed, $allowed_html, $expected_error_message) { public function testValidationWhenAdding($filter_html_status, $filter_align_status, $filter_caption_status, $filter_html_image_secure_status, $media_embed, $allowed_html, $expected_error_message) {
@ -100,7 +99,6 @@ class MediaEmbedFilterConfigurationUiTest extends MediaJavascriptTestBase {
/** /**
* @covers ::media_form_filter_format_edit_form_alter * @covers ::media_form_filter_format_edit_form_alter
* @covers ::media_filter_format_edit_form_validate
* @dataProvider providerTestValidations * @dataProvider providerTestValidations
*/ */
public function testValidationWhenEditing($filter_html_status, $filter_align_status, $filter_caption_status, $filter_html_image_secure_status, $media_embed, $allowed_html, $expected_error_message) { public function testValidationWhenEditing($filter_html_status, $filter_align_status, $filter_caption_status, $filter_html_image_secure_status, $media_embed, $allowed_html, $expected_error_message) {

View File

@ -962,7 +962,7 @@ parameters:
- -
message: "#^@covers value \\\\Drupal\\\\ckeditor5\\\\Plugin\\\\Editor\\\\CKEditor5\\:\\:validatePair\\(\\) references an invalid method\\.$#" message: "#^@covers value \\\\Drupal\\\\ckeditor5\\\\Plugin\\\\Editor\\\\CKEditor5\\:\\:validatePair\\(\\) references an invalid method\\.$#"
count: 2 count: 1
path: modules/ckeditor5/tests/src/Kernel/ValidatorsTest.php path: modules/ckeditor5/tests/src/Kernel/ValidatorsTest.php
- -
@ -970,34 +970,9 @@ parameters:
count: 1 count: 1
path: modules/ckeditor5/tests/src/Kernel/ValidatorsTest.php path: modules/ckeditor5/tests/src/Kernel/ValidatorsTest.php
-
message: "#^Class already @covers \\\\Drupal\\\\ckeditor5\\\\Plugin\\\\Editor\\\\CKEditor5\\:\\:validatePair\\(\\) so the method @covers is redundant\\.$#"
count: 1
path: modules/ckeditor5/tests/src/Kernel/ValidatorsTest.php
-
message: "#^Class already @covers \\\\Drupal\\\\ckeditor5\\\\Plugin\\\\Validation\\\\Constraint\\\\EnabledConfigurablePluginsConstraintValidator so the method @covers is redundant\\.$#"
count: 2
path: modules/ckeditor5/tests/src/Kernel/ValidatorsTest.php
-
message: "#^Class already @covers \\\\Drupal\\\\ckeditor5\\\\Plugin\\\\Validation\\\\Constraint\\\\FundamentalCompatibilityConstraintValidator so the method @covers is redundant\\.$#"
count: 1
path: modules/ckeditor5/tests/src/Kernel/ValidatorsTest.php
-
message: "#^Class already @covers \\\\Drupal\\\\ckeditor5\\\\Plugin\\\\Validation\\\\Constraint\\\\ToolbarItemConstraintValidator so the method @covers is redundant\\.$#"
count: 2
path: modules/ckeditor5/tests/src/Kernel/ValidatorsTest.php
-
message: "#^Class already @covers \\\\Drupal\\\\ckeditor5\\\\Plugin\\\\Validation\\\\Constraint\\\\ToolbarItemDependencyConstraintValidator so the method @covers is redundant\\.$#"
count: 2
path: modules/ckeditor5/tests/src/Kernel/ValidatorsTest.php
- -
message: "#^@covers value \\\\Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5PluginManager\\:\\:getCKEditor5PluginConfig\\(\\) references an invalid method\\.$#" message: "#^@covers value \\\\Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5PluginManager\\:\\:getCKEditor5PluginConfig\\(\\) references an invalid method\\.$#"
count: 2 count: 1
path: modules/ckeditor5/tests/src/Kernel/WildcardHtmlSupportTest.php path: modules/ckeditor5/tests/src/Kernel/WildcardHtmlSupportTest.php
- -
@ -1005,11 +980,6 @@ parameters:
count: 1 count: 1
path: modules/ckeditor5/tests/src/Kernel/WildcardHtmlSupportTest.php path: modules/ckeditor5/tests/src/Kernel/WildcardHtmlSupportTest.php
-
message: "#^Class already @covers \\\\Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5PluginManager\\:\\:getCKEditor5PluginConfig\\(\\) so the method @covers is redundant\\.$#"
count: 1
path: modules/ckeditor5/tests/src/Kernel/WildcardHtmlSupportTest.php
- -
message: "#^@covers value \\\\Drupal\\\\ckeditor5\\\\HTMLRestrictions\\:\\:allowsNothing\\(\\) references an invalid method\\.$#" message: "#^@covers value \\\\Drupal\\\\ckeditor5\\\\HTMLRestrictions\\:\\:allowsNothing\\(\\) references an invalid method\\.$#"
count: 1 count: 1
@ -1945,11 +1915,6 @@ parameters:
count: 1 count: 1
path: modules/media/src/OEmbed/UrlResolver.php path: modules/media/src/OEmbed/UrlResolver.php
-
message: "#^Class already @covers \\:\\:media_filter_format_edit_form_validate so the method @covers is redundant\\.$#"
count: 2
path: modules/media/tests/src/FunctionalJavascript/MediaEmbedFilterConfigurationUiTest.php
- -
message: "#^Relying on entity queries to check access by default is deprecated in drupal\\:9\\.2\\.0 and an error will be thrown from drupal\\:10\\.0\\.0\\. Call \\\\Drupal\\\\Core\\\\Entity\\\\Query\\\\QueryInterface\\:\\:accessCheck\\(\\) with TRUE or FALSE to specify whether access should be checked\\.$#" message: "#^Relying on entity queries to check access by default is deprecated in drupal\\:9\\.2\\.0 and an error will be thrown from drupal\\:10\\.0\\.0\\. Call \\\\Drupal\\\\Core\\\\Entity\\\\Query\\\\QueryInterface\\:\\:accessCheck\\(\\) with TRUE or FALSE to specify whether access should be checked\\.$#"
count: 1 count: 1