From 1f7aa7ac832dcaad4da9eb6c99103347ab6fc70f Mon Sep 17 00:00:00 2001 From: catch <catch@35733.no-reply.drupal.org> Date: Thu, 30 Mar 2023 16:22:57 +0100 Subject: [PATCH] Issue #3351218 by Spokje: Fix PHPStan L1 errors "@covers value \Foo\Bar::baz() references an invalid method." --- .../SourceEditingTest.php | 2 +- .../src/Kernel/CKEditor5PluginManagerTest.php | 8 +- .../src/Kernel/SmartDefaultSettingsTest.php | 2 +- .../tests/src/Kernel/ValidatorsTest.php | 4 +- .../src/Kernel/WildcardHtmlSupportTest.php | 4 +- .../tests/src/Unit/HTMLRestrictionsTest.php | 26 +- .../process/d6/FieldInstanceSettingsTest.php | 2 +- .../tests/src/Kernel/SectionListTestBase.php | 2 + .../Plugin/id_map/SqlDeprecationTest.php | 2 +- .../tests/src/Kernel/TextItemBaseTest.php | 1 + .../Unit/Form/EntityPermissionsFormTest.php | 4 +- .../Plugin/Derivative/UserLocalTaskTest.php | 2 +- core/phpstan-baseline.neon | 305 ------------------ .../Entity/RevisionDeleteFormTest.php | 6 +- .../Entity/RevisionRevertFormTest.php | 4 +- .../Entity/RevisionVersionHistoryTest.php | 2 +- .../Database/DriverSpecificSchemaTestBase.php | 2 + .../KernelTests/Core/Database/QueryTest.php | 1 + .../Core/Entity/EntityBaseTest.php | 1 - .../Core/Site/SettingsRewriteTest.php | 4 +- .../Core/Theme/ThemeInstallerTest.php | 2 +- .../MTimeProtectedFileStorageBase.php | 5 - .../Core/Database/DatabaseEventsTest.php | 8 +- .../Core/Field/FieldFilteredMarkupTest.php | 2 +- .../Core/Mail/Plugin/Mail/PhpMailTest.php | 2 +- .../Tests/Core/Routing/RouteMatchTestBase.php | 2 + 26 files changed, 50 insertions(+), 355 deletions(-) diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTest.php index d93a756d6d39..010dcaf192ad 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTest.php @@ -13,7 +13,7 @@ /** * @coversDefaultClass \Drupal\ckeditor5\Plugin\CKEditor5Plugin\SourceEditing - * @covers \Drupal\ckeditor5\Plugin\CKEditor5PluginManager::getCKEditor5PluginConfig() + * @covers \Drupal\ckeditor5\Plugin\CKEditor5PluginManager::getCKEditor5PluginConfig * @group ckeditor5 * @internal */ diff --git a/core/modules/ckeditor5/tests/src/Kernel/CKEditor5PluginManagerTest.php b/core/modules/ckeditor5/tests/src/Kernel/CKEditor5PluginManagerTest.php index 64e18af00e5f..bb036260b0f4 100644 --- a/core/modules/ckeditor5/tests/src/Kernel/CKEditor5PluginManagerTest.php +++ b/core/modules/ckeditor5/tests/src/Kernel/CKEditor5PluginManagerTest.php @@ -172,7 +172,7 @@ private function mockModuleInVfs(string $module_name, string $yaml, array $addit } /** - * @covers \Drupal\ckeditor5\Plugin\CKEditor5PluginManager::processDefinition() + * @covers \Drupal\ckeditor5\Plugin\CKEditor5PluginManager::processDefinition * @dataProvider providerTestInvalidPluginDefinitions */ public function testInvalidPluginDefinitions(string $yaml, ?string $expected_message, array $additional_files = []): void { @@ -1523,7 +1523,7 @@ public function providerTestPluginSupportingElement() { } /** - * @covers \Drupal\ckeditor5\Plugin\CKEditor5PluginDefinition::validateCKEditor5Aspects() + * @covers \Drupal\ckeditor5\Plugin\CKEditor5PluginDefinition::validateCKEditor5Aspects */ public function testAutomaticLinkDecoratorsDisallowed(): void { $this->expectException(InvalidPluginDefinitionException::class); @@ -1535,7 +1535,7 @@ public function testAutomaticLinkDecoratorsDisallowed(): void { } /** - * @covers \Drupal\ckeditor5\Plugin\CKEditor5PluginDefinition::validateCKEditor5Aspects() + * @covers \Drupal\ckeditor5\Plugin\CKEditor5PluginDefinition::validateCKEditor5Aspects */ public function testExternalLinkAutomaticLinkDecoratorDisallowed(): void { $this->expectException(InvalidPluginDefinitionException::class); @@ -1547,7 +1547,7 @@ public function testExternalLinkAutomaticLinkDecoratorDisallowed(): void { } /** - * @covers ::getDiscovery + * @covers \Drupal\ckeditor5\Plugin\CKEditor5PluginManager::getDiscovery * @dataProvider providerTestDerivedPluginDefinitions */ public function testDerivedPluginDefinitions(string $yaml, ?string $expected_message, array $additional_files = [], ?array $expected_derived_plugin_definitions = NULL): void { diff --git a/core/modules/ckeditor5/tests/src/Kernel/SmartDefaultSettingsTest.php b/core/modules/ckeditor5/tests/src/Kernel/SmartDefaultSettingsTest.php index ac588ff9d6de..4508759f83fc 100644 --- a/core/modules/ckeditor5/tests/src/Kernel/SmartDefaultSettingsTest.php +++ b/core/modules/ckeditor5/tests/src/Kernel/SmartDefaultSettingsTest.php @@ -15,7 +15,7 @@ use Symfony\Component\Yaml\Yaml; /** - * @covers \Drupal\ckeditor5\SmartDefaultSettings::computeSmartDefaultSettings() + * @covers \Drupal\ckeditor5\SmartDefaultSettings::computeSmartDefaultSettings * @group ckeditor5 * @internal */ diff --git a/core/modules/ckeditor5/tests/src/Kernel/ValidatorsTest.php b/core/modules/ckeditor5/tests/src/Kernel/ValidatorsTest.php index e1724fe9db2f..1f4c8a5327ed 100644 --- a/core/modules/ckeditor5/tests/src/Kernel/ValidatorsTest.php +++ b/core/modules/ckeditor5/tests/src/Kernel/ValidatorsTest.php @@ -20,7 +20,7 @@ * @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\Editor\CKEditor5::validatePair() + * @covers \Drupal\ckeditor5\Plugin\Editor\CKEditor5::validatePair * @covers \Drupal\ckeditor5\Plugin\Validation\Constraint\FundamentalCompatibilityConstraintValidator * @covers \Drupal\ckeditor5\Plugin\Validation\Constraint\CKEditor5MediaAndFilterSettingsInSyncConstraintValidator * @group ckeditor5 @@ -1461,7 +1461,7 @@ public function providerPair(): array { /** * Tests that validation works with >1 enabled HTML restrictor filters. * - * @covers \Drupal\ckeditor5\Plugin\Validation\Constraint\FundamentalCompatibilityConstraintValidator::checkHtmlRestrictionsMatch() + * @covers \Drupal\ckeditor5\Plugin\Validation\Constraint\FundamentalCompatibilityConstraintValidator::checkHtmlRestrictionsMatch */ public function testMultipleHtmlRestrictingFilters(): void { $this->container->get('module_installer')->install(['filter_test']); diff --git a/core/modules/ckeditor5/tests/src/Kernel/WildcardHtmlSupportTest.php b/core/modules/ckeditor5/tests/src/Kernel/WildcardHtmlSupportTest.php index 3888a6d8c6ce..a5e0787f80c6 100644 --- a/core/modules/ckeditor5/tests/src/Kernel/WildcardHtmlSupportTest.php +++ b/core/modules/ckeditor5/tests/src/Kernel/WildcardHtmlSupportTest.php @@ -9,7 +9,7 @@ use Symfony\Component\Validator\ConstraintViolation; /** - * @covers \Drupal\ckeditor5\Plugin\CKEditor5PluginManager::getCKEditor5PluginConfig() + * @covers \Drupal\ckeditor5\Plugin\CKEditor5PluginManager::getCKEditor5PluginConfig * @group ckeditor5 * @internal */ @@ -40,7 +40,7 @@ protected function setUp(): void { } /** - * @covers \Drupal\ckeditor5\Plugin\CKEditor5Plugin\SourceEditing::getDynamicPluginConfig() + * @covers \Drupal\ckeditor5\Plugin\CKEditor5Plugin\SourceEditing::getDynamicPluginConfig * @dataProvider providerGhsConfiguration */ public function testGhsConfiguration(string $filter_html_allowed, array $source_editing_tags, array $expected_ghs_configuration, ?array $additional_toolbar_items = []): void { diff --git a/core/modules/ckeditor5/tests/src/Unit/HTMLRestrictionsTest.php b/core/modules/ckeditor5/tests/src/Unit/HTMLRestrictionsTest.php index ed15093e8d1a..cdad42b7a22c 100644 --- a/core/modules/ckeditor5/tests/src/Unit/HTMLRestrictionsTest.php +++ b/core/modules/ckeditor5/tests/src/Unit/HTMLRestrictionsTest.php @@ -154,8 +154,8 @@ public function providerConstruct(): \Generator { } /** - * @covers ::allowsNothing() - * @covers ::getAllowedElements() + * @covers ::allowsNothing + * @covers ::getAllowedElements * @dataProvider providerCounting */ public function testCounting(array $elements, bool $expected_is_empty, int $expected_concrete_only_count, int $expected_concrete_plus_wildcard_count): void { @@ -218,9 +218,9 @@ public function providerCounting(): \Generator { } /** - * @covers ::fromString() - * @covers ::fromTextFormat() - * @covers ::fromFilterPluginInstance() + * @covers ::fromString + * @covers ::fromTextFormat + * @covers ::fromFilterPluginInstance * @dataProvider providerConvenienceConstructors */ public function testConvenienceConstructors($input, array $expected, ?array $expected_raw = NULL): void { @@ -627,9 +627,9 @@ public function providerConvenienceConstructors(): \Generator { } /** - * @covers ::toCKEditor5ElementsArray() - * @covers ::toFilterHtmlAllowedTagsString() - * @covers ::toGeneralHtmlSupportConfig() + * @covers ::toCKEditor5ElementsArray + * @covers ::toFilterHtmlAllowedTagsString + * @covers ::toGeneralHtmlSupportConfig * @dataProvider providerRepresentations */ public function testRepresentations(HTMLRestrictions $restrictions, array $expected_elements_array, string $expected_allowed_html_string, array $expected_ghs_config): void { @@ -871,9 +871,9 @@ public function providerRepresentations(): \Generator { } /** - * @covers ::diff() - * @covers ::intersect() - * @covers ::merge() + * @covers ::diff + * @covers ::intersect + * @covers ::merge * @dataProvider providerOperands */ public function testOperations(HTMLRestrictions $a, HTMLRestrictions $b, $expected_diff, $expected_intersection, $expected_union): void { @@ -1493,8 +1493,8 @@ public function providerOperands(): \Generator { /** * @covers ::getWildcardSubset * @covers ::getConcreteSubset - * @covers ::getPlainTagsSubset() - * @covers ::extractPlainTagsSubset() + * @covers ::getPlainTagsSubset + * @covers ::extractPlainTagsSubset * @dataProvider providerSubsets */ public function testSubsets(HTMLRestrictions $input, HTMLRestrictions $expected_wildcard_subset, HTMLRestrictions $expected_concrete_subset, HTMLRestrictions $expected_plain_tags_subset, HTMLRestrictions $expected_extracted_plain_tags_subset): void { diff --git a/core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldInstanceSettingsTest.php b/core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldInstanceSettingsTest.php index cb69ff29c9a6..9d099b9a1192 100644 --- a/core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldInstanceSettingsTest.php +++ b/core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldInstanceSettingsTest.php @@ -17,7 +17,7 @@ class FieldInstanceSettingsTest extends UnitTestCase { /** - * @covers ::getSettings + * @covers \Drupal\Core\Field\BaseFieldDefinition::getSettings * * @dataProvider getSettingsProvider */ diff --git a/core/modules/layout_builder/tests/src/Kernel/SectionListTestBase.php b/core/modules/layout_builder/tests/src/Kernel/SectionListTestBase.php index 1421375f220e..a7388d205a18 100644 --- a/core/modules/layout_builder/tests/src/Kernel/SectionListTestBase.php +++ b/core/modules/layout_builder/tests/src/Kernel/SectionListTestBase.php @@ -8,6 +8,8 @@ /** * Provides a base class for testing implementations of a section list. + * + * @coversDefaultClass \Drupal\layout_builder\Plugin\SectionStorage\SectionStorageBase */ abstract class SectionListTestBase extends EntityKernelTestBase { diff --git a/core/modules/migrate/tests/src/Kernel/Plugin/id_map/SqlDeprecationTest.php b/core/modules/migrate/tests/src/Kernel/Plugin/id_map/SqlDeprecationTest.php index 4bdab83ec4b3..4e26f26a6859 100644 --- a/core/modules/migrate/tests/src/Kernel/Plugin/id_map/SqlDeprecationTest.php +++ b/core/modules/migrate/tests/src/Kernel/Plugin/id_map/SqlDeprecationTest.php @@ -19,7 +19,7 @@ class SqlDeprecationTest extends KernelTestBase { protected static $modules = ['migrate']; /** - * @covers ::__construct + * @covers \Drupal\migrate\Plugin\migrate\id_map\Sql::__construct */ public function testOptionalParametersDeprecation(): void { $migration = $this->prophesize('\Drupal\migrate\Plugin\MigrationInterface')->reveal(); diff --git a/core/modules/text/tests/src/Kernel/TextItemBaseTest.php b/core/modules/text/tests/src/Kernel/TextItemBaseTest.php index 3087cb7fa3e3..c43f9bdcd199 100644 --- a/core/modules/text/tests/src/Kernel/TextItemBaseTest.php +++ b/core/modules/text/tests/src/Kernel/TextItemBaseTest.php @@ -12,6 +12,7 @@ /** * Tests TextItemBase. * + * @coversDefaultClass \Drupal\text\Plugin\Field\FieldType\TextItemBase * @group text */ class TextItemBaseTest extends KernelTestBase { diff --git a/core/modules/user/tests/src/Unit/Form/EntityPermissionsFormTest.php b/core/modules/user/tests/src/Unit/Form/EntityPermissionsFormTest.php index b97d2614b3dc..cc994d858e2a 100644 --- a/core/modules/user/tests/src/Unit/Form/EntityPermissionsFormTest.php +++ b/core/modules/user/tests/src/Unit/Form/EntityPermissionsFormTest.php @@ -37,8 +37,8 @@ class EntityPermissionsFormTest extends UnitTestCase { * TRUE if there is a permission to be managed by the form. * * @dataProvider providerTestPermissionsByProvider - * @covers ::access() - * @covers ::permissionsByProvider() + * @covers \Drupal\user\Form\EntityPermissionsForm::access + * @covers \Drupal\user\Form\EntityPermissionsForm::permissionsByProvider */ public function testPermissionsByProvider(string $dependency_name, bool $found) { diff --git a/core/modules/user/tests/src/Unit/Plugin/Derivative/UserLocalTaskTest.php b/core/modules/user/tests/src/Unit/Plugin/Derivative/UserLocalTaskTest.php index 654aa92b50d9..9d2a0209914d 100644 --- a/core/modules/user/tests/src/Unit/Plugin/Derivative/UserLocalTaskTest.php +++ b/core/modules/user/tests/src/Unit/Plugin/Derivative/UserLocalTaskTest.php @@ -62,7 +62,7 @@ protected function setUp(): void { /** * Tests the derivatives generated for local tasks. * - * @covers \Drupal\user\Plugin\Derivative\UserLocalTask::getDerivativeDefinitions() + * @covers \Drupal\user\Plugin\Derivative\UserLocalTask::getDerivativeDefinitions */ public function testGetDerivativeDefinitions() { $expected = [ diff --git a/core/phpstan-baseline.neon b/core/phpstan-baseline.neon index d01194ec5590..8f2a879b76cc 100644 --- a/core/phpstan-baseline.neon +++ b/core/phpstan-baseline.neon @@ -935,116 +935,6 @@ parameters: count: 1 path: modules/ckeditor5/tests/src/Functional/Update/CKEditor5UpdatePluginSettingsSortTest.php - - - message: "#^@covers value \\\\Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5PluginManager\\:\\:getCKEditor5PluginConfig\\(\\) references an invalid method\\.$#" - count: 1 - path: modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTest.php - - - - message: "#^@covers value \\:\\:getDiscovery references an invalid method\\.$#" - count: 1 - path: modules/ckeditor5/tests/src/Kernel/CKEditor5PluginManagerTest.php - - - - message: "#^@covers value \\\\Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5PluginDefinition\\:\\:validateCKEditor5Aspects\\(\\) references an invalid method\\.$#" - count: 2 - path: modules/ckeditor5/tests/src/Kernel/CKEditor5PluginManagerTest.php - - - - message: "#^@covers value \\\\Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5PluginManager\\:\\:processDefinition\\(\\) references an invalid method\\.$#" - count: 1 - path: modules/ckeditor5/tests/src/Kernel/CKEditor5PluginManagerTest.php - - - - message: "#^@covers value \\\\Drupal\\\\ckeditor5\\\\SmartDefaultSettings\\:\\:computeSmartDefaultSettings\\(\\) references an invalid method\\.$#" - count: 1 - path: modules/ckeditor5/tests/src/Kernel/SmartDefaultSettingsTest.php - - - - message: "#^@covers value \\\\Drupal\\\\ckeditor5\\\\Plugin\\\\Editor\\\\CKEditor5\\:\\:validatePair\\(\\) references an invalid method\\.$#" - count: 1 - path: modules/ckeditor5/tests/src/Kernel/ValidatorsTest.php - - - - message: "#^@covers value \\\\Drupal\\\\ckeditor5\\\\Plugin\\\\Validation\\\\Constraint\\\\FundamentalCompatibilityConstraintValidator\\:\\:checkHtmlRestrictionsMatch\\(\\) references an invalid method\\.$#" - count: 1 - path: modules/ckeditor5/tests/src/Kernel/ValidatorsTest.php - - - - message: "#^@covers value \\\\Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5PluginManager\\:\\:getCKEditor5PluginConfig\\(\\) references an invalid method\\.$#" - count: 1 - path: modules/ckeditor5/tests/src/Kernel/WildcardHtmlSupportTest.php - - - - message: "#^@covers value \\\\Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5Plugin\\\\SourceEditing\\:\\:getDynamicPluginConfig\\(\\) references an invalid method\\.$#" - count: 1 - path: modules/ckeditor5/tests/src/Kernel/WildcardHtmlSupportTest.php - - - - message: "#^@covers value \\\\Drupal\\\\ckeditor5\\\\HTMLRestrictions\\:\\:allowsNothing\\(\\) references an invalid method\\.$#" - count: 1 - path: modules/ckeditor5/tests/src/Unit/HTMLRestrictionsTest.php - - - - message: "#^@covers value \\\\Drupal\\\\ckeditor5\\\\HTMLRestrictions\\:\\:diff\\(\\) references an invalid method\\.$#" - count: 1 - path: modules/ckeditor5/tests/src/Unit/HTMLRestrictionsTest.php - - - - message: "#^@covers value \\\\Drupal\\\\ckeditor5\\\\HTMLRestrictions\\:\\:extractPlainTagsSubset\\(\\) references an invalid method\\.$#" - count: 1 - path: modules/ckeditor5/tests/src/Unit/HTMLRestrictionsTest.php - - - - message: "#^@covers value \\\\Drupal\\\\ckeditor5\\\\HTMLRestrictions\\:\\:fromFilterPluginInstance\\(\\) references an invalid method\\.$#" - count: 1 - path: modules/ckeditor5/tests/src/Unit/HTMLRestrictionsTest.php - - - - message: "#^@covers value \\\\Drupal\\\\ckeditor5\\\\HTMLRestrictions\\:\\:fromString\\(\\) references an invalid method\\.$#" - count: 1 - path: modules/ckeditor5/tests/src/Unit/HTMLRestrictionsTest.php - - - - message: "#^@covers value \\\\Drupal\\\\ckeditor5\\\\HTMLRestrictions\\:\\:fromTextFormat\\(\\) references an invalid method\\.$#" - count: 1 - path: modules/ckeditor5/tests/src/Unit/HTMLRestrictionsTest.php - - - - message: "#^@covers value \\\\Drupal\\\\ckeditor5\\\\HTMLRestrictions\\:\\:getAllowedElements\\(\\) references an invalid method\\.$#" - count: 1 - path: modules/ckeditor5/tests/src/Unit/HTMLRestrictionsTest.php - - - - message: "#^@covers value \\\\Drupal\\\\ckeditor5\\\\HTMLRestrictions\\:\\:getPlainTagsSubset\\(\\) references an invalid method\\.$#" - count: 1 - path: modules/ckeditor5/tests/src/Unit/HTMLRestrictionsTest.php - - - - message: "#^@covers value \\\\Drupal\\\\ckeditor5\\\\HTMLRestrictions\\:\\:intersect\\(\\) references an invalid method\\.$#" - count: 1 - path: modules/ckeditor5/tests/src/Unit/HTMLRestrictionsTest.php - - - - message: "#^@covers value \\\\Drupal\\\\ckeditor5\\\\HTMLRestrictions\\:\\:merge\\(\\) references an invalid method\\.$#" - count: 1 - path: modules/ckeditor5/tests/src/Unit/HTMLRestrictionsTest.php - - - - message: "#^@covers value \\\\Drupal\\\\ckeditor5\\\\HTMLRestrictions\\:\\:toCKEditor5ElementsArray\\(\\) references an invalid method\\.$#" - count: 1 - path: modules/ckeditor5/tests/src/Unit/HTMLRestrictionsTest.php - - - - message: "#^@covers value \\\\Drupal\\\\ckeditor5\\\\HTMLRestrictions\\:\\:toFilterHtmlAllowedTagsString\\(\\) references an invalid method\\.$#" - count: 1 - path: modules/ckeditor5/tests/src/Unit/HTMLRestrictionsTest.php - - - - message: "#^@covers value \\\\Drupal\\\\ckeditor5\\\\HTMLRestrictions\\:\\:toGeneralHtmlSupportConfig\\(\\) references an invalid method\\.$#" - count: 1 - path: modules/ckeditor5/tests/src/Unit/HTMLRestrictionsTest.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: 1 @@ -1395,11 +1285,6 @@ parameters: count: 1 path: modules/field/tests/src/Unit/FieldStorageConfigEntityUnitTest.php - - - message: "#^@covers value \\\\Drupal\\\\field\\\\Plugin\\\\migrate\\\\process\\\\d6\\\\FieldInstanceSettings\\:\\:getSettings references an invalid method\\.$#" - count: 1 - path: modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldInstanceSettingsTest.php - - message: "#^Variable \\$entity_display might not be defined\\.$#" count: 1 @@ -1745,31 +1630,6 @@ parameters: count: 1 path: modules/layout_builder/src/Form/LayoutBuilderEntityViewDisplayForm.php - - - message: "#^@covers value \\:\\:appendSection references an invalid method\\.$#" - count: 1 - path: modules/layout_builder/tests/src/Kernel/SectionListTestBase.php - - - - message: "#^@covers value \\:\\:getSection references an invalid method\\.$#" - count: 2 - path: modules/layout_builder/tests/src/Kernel/SectionListTestBase.php - - - - message: "#^@covers value \\:\\:insertSection references an invalid method\\.$#" - count: 1 - path: modules/layout_builder/tests/src/Kernel/SectionListTestBase.php - - - - message: "#^@covers value \\:\\:removeAllSections references an invalid method\\.$#" - count: 1 - path: modules/layout_builder/tests/src/Kernel/SectionListTestBase.php - - - - message: "#^@covers value \\:\\:removeSection references an invalid method\\.$#" - count: 2 - path: modules/layout_builder/tests/src/Kernel/SectionListTestBase.php - - message: "#^Constructor of class Drupal\\\\link\\\\Plugin\\\\migrate\\\\process\\\\FieldLink has an unused parameter \\$migration\\.$#" count: 1 @@ -1985,11 +1845,6 @@ parameters: count: 1 path: modules/migrate/tests/src/Kernel/MigrateTestBase.php - - - message: "#^@covers value \\:\\:__construct references an invalid method\\.$#" - count: 1 - path: modules/migrate/tests/src/Kernel/Plugin/id_map/SqlDeprecationTest.php - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" count: 1 @@ -2705,16 +2560,6 @@ parameters: count: 1 path: modules/taxonomy/tests/src/Unit/Plugin/migrate/field/TaxonomyTermReferenceFieldTest.php - - - message: "#^@covers value \\:\\:calculateDependencies references an invalid method\\.$#" - count: 1 - path: modules/text/tests/src/Kernel/TextItemBaseTest.php - - - - message: "#^@covers value \\:\\:generateSampleValue references an invalid method\\.$#" - count: 1 - path: modules/text/tests/src/Kernel/TextItemBaseTest.php - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" count: 1 @@ -2875,21 +2720,6 @@ parameters: count: 1 path: modules/user/tests/src/Kernel/Migrate/d6/MigrateUserRoleTest.php - - - message: "#^@covers value \\\\Drupal\\\\user\\\\Form\\\\EntityPermissionsForm\\:\\:access\\(\\) references an invalid method\\.$#" - count: 1 - path: modules/user/tests/src/Unit/Form/EntityPermissionsFormTest.php - - - - message: "#^@covers value \\\\Drupal\\\\user\\\\Form\\\\EntityPermissionsForm\\:\\:permissionsByProvider\\(\\) references an invalid method\\.$#" - count: 1 - path: modules/user/tests/src/Unit/Form/EntityPermissionsFormTest.php - - - - message: "#^@covers value \\\\Drupal\\\\user\\\\Plugin\\\\Derivative\\\\UserLocalTask\\:\\:getDerivativeDefinitions\\(\\) references an invalid method\\.$#" - count: 1 - path: modules/user/tests/src/Unit/Plugin/Derivative/UserLocalTaskTest.php - - message: "#^Variable \\$result in isset\\(\\) always exists and is not nullable\\.$#" count: 1 @@ -3480,21 +3310,6 @@ parameters: count: 1 path: tests/Drupal/FunctionalJavascriptTests/WebDriverCurlService.php - - - message: "#^@covers value \\\\Drupal\\\\Core\\\\Entity\\\\EntityRevisionAccessCheck\\:\\:checkAccess references an invalid method\\.$#" - count: 3 - path: tests/Drupal/FunctionalTests/Entity/RevisionDeleteFormTest.php - - - - message: "#^@covers value \\\\Drupal\\\\Core\\\\Entity\\\\EntityRevisionAccessCheck\\:\\:checkAccess references an invalid method\\.$#" - count: 2 - path: tests/Drupal/FunctionalTests/Entity/RevisionRevertFormTest.php - - - - message: "#^@covers value \\\\Drupal\\\\Core\\\\Entity\\\\Controller\\\\RevisionControllerTrait\\:\\:revisionOverview references an invalid method\\.$#" - count: 1 - path: tests/Drupal/FunctionalTests/Entity/RevisionVersionHistoryTest.php - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" count: 1 @@ -3520,36 +3335,6 @@ parameters: count: 2 path: tests/Drupal/KernelTests/Core/Database/DriverSpecificKernelTestBase.php - - - message: "#^@covers value \\:\\:addField references an invalid method\\.$#" - count: 1 - path: tests/Drupal/KernelTests/Core/Database/DriverSpecificSchemaTestBase.php - - - - message: "#^@covers value \\:\\:changeField references an invalid method\\.$#" - count: 1 - path: tests/Drupal/KernelTests/Core/Database/DriverSpecificSchemaTestBase.php - - - - message: "#^@covers value \\:\\:dropField references an invalid method\\.$#" - count: 1 - path: tests/Drupal/KernelTests/Core/Database/DriverSpecificSchemaTestBase.php - - - - message: "#^@covers value \\:\\:findPrimaryKeyColumns references an invalid method\\.$#" - count: 2 - path: tests/Drupal/KernelTests/Core/Database/DriverSpecificSchemaTestBase.php - - - - message: "#^@covers value \\:\\:prepareStatement references an invalid method\\.$#" - count: 1 - path: tests/Drupal/KernelTests/Core/Database/QueryTest.php - - - - message: "#^@covers value \\:\\:query references an invalid method\\.$#" - count: 1 - path: tests/Drupal/KernelTests/Core/Database/QueryTest.php - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" count: 1 @@ -3570,11 +3355,6 @@ parameters: count: 2 path: tests/Drupal/KernelTests/Core/Entity/CreateSampleEntityTest.php - - - message: "#^@covers value \\\\Drupal\\\\Core\\\\Entity\\\\EntityBase\\:\\:getClass references an invalid method\\.$#" - count: 1 - path: tests/Drupal/KernelTests/Core/Entity/EntityBaseTest.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: 9 @@ -3640,11 +3420,6 @@ parameters: count: 1 path: tests/Drupal/KernelTests/Core/Site/LegacySettingsRewriteTest.php - - - message: "#^@covers value \\\\Drupal\\\\Core\\\\Site\\\\SettingsEditor\\:\\:rewrite\\(\\) references an invalid method\\.$#" - count: 1 - path: tests/Drupal/KernelTests/Core/Site/SettingsRewriteTest.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: 1 @@ -3660,11 +3435,6 @@ parameters: count: 1 path: tests/Drupal/KernelTests/Core/Theme/FrontMatterTest.php - - - message: "#^@covers value \\:\\:install references an invalid method\\.$#" - count: 1 - path: tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.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: 5 @@ -3715,26 +3485,6 @@ parameters: count: 1 path: tests/Drupal/Tests/Component/DependencyInjection/PhpArrayContainerTest.php - - - message: "#^@covers value \\:\\:delete references an invalid method\\.$#" - count: 1 - path: tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php - - - - message: "#^@covers value \\:\\:exists references an invalid method\\.$#" - count: 1 - path: tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php - - - - message: "#^@covers value \\:\\:load references an invalid method\\.$#" - count: 1 - path: tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php - - - - message: "#^@covers value \\:\\:save references an invalid method\\.$#" - count: 1 - path: tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php - - message: "#^Constructor of class Drupal\\\\Tests\\\\Component\\\\Plugin\\\\Factory\\\\ArgumentsAllNull has an unused parameter \\$charismatic\\.$#" count: 1 @@ -3930,16 +3680,6 @@ parameters: count: 1 path: tests/Drupal/Tests/Core/Database/ConditionTest.php - - - message: "#^@covers value \\\\Drupal\\\\Core\\\\Database\\\\Connection\\:\\:disableEvent references an invalid method\\.$#" - count: 2 - path: tests/Drupal/Tests/Core/Database/DatabaseEventsTest.php - - - - message: "#^@covers value \\\\Drupal\\\\Core\\\\Database\\\\Connection\\:\\:enableEvent references an invalid method\\.$#" - count: 2 - path: tests/Drupal/Tests/Core/Database/DatabaseEventsTest.php - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" count: 1 @@ -4050,16 +3790,6 @@ parameters: count: 1 path: tests/Drupal/Tests/Core/EventSubscriber/PsrResponseSubscriberTest.php - - - message: "#^@covers value \\: \\:\\:displayAllowedTags references an invalid method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Field/FieldFilteredMarkupTest.php - - - - message: "#^Annotation \"@covers\\: \\:\\:displayAllowedTags\" is invalid, \"@covers\" should be followed by a space and a value\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Field/FieldFilteredMarkupTest.php - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" count: 1 @@ -4080,11 +3810,6 @@ parameters: count: 1 path: tests/Drupal/Tests/Core/Lock/LockBackendAbstractTest.php - - - message: "#^@covers value \\\\Drupal\\\\Core\\\\Mail\\\\Plugin\\\\Mail\\\\PhpMail\\:\\:testMail references an invalid method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Mail/Plugin/Mail/PhpMailTest.php - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" count: 1 @@ -4190,36 +3915,6 @@ parameters: count: 1 path: tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php - - - message: "#^@covers value \\:\\:getParameter references an invalid method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Routing/RouteMatchTestBase.php - - - - message: "#^@covers value \\:\\:getParameters references an invalid method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Routing/RouteMatchTestBase.php - - - - message: "#^@covers value \\:\\:getRawParameter references an invalid method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Routing/RouteMatchTestBase.php - - - - message: "#^@covers value \\:\\:getRawParameters references an invalid method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Routing/RouteMatchTestBase.php - - - - message: "#^@covers value \\:\\:getRouteName references an invalid method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Routing/RouteMatchTestBase.php - - - - message: "#^@covers value \\:\\:getRouteObject references an invalid method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Routing/RouteMatchTestBase.php - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" count: 1 diff --git a/core/tests/Drupal/FunctionalTests/Entity/RevisionDeleteFormTest.php b/core/tests/Drupal/FunctionalTests/Entity/RevisionDeleteFormTest.php index 17372ca8270e..9c0620fb367a 100644 --- a/core/tests/Drupal/FunctionalTests/Entity/RevisionDeleteFormTest.php +++ b/core/tests/Drupal/FunctionalTests/Entity/RevisionDeleteFormTest.php @@ -93,7 +93,7 @@ public function providerPageTitle(): array { /** * Test cannot delete latest revision. * - * @covers \Drupal\Core\Entity\EntityRevisionAccessCheck::checkAccess + * @covers \Drupal\Core\Entity\EntityAccessControlHandler::checkAccess */ public function testAccessDeleteLatest(): void { /** @var \Drupal\entity_test\Entity\EntityTestRev $entity */ @@ -111,7 +111,7 @@ public function testAccessDeleteLatest(): void { /** * Test cannot delete default revision. * - * @covers \Drupal\Core\Entity\EntityRevisionAccessCheck::checkAccess + * @covers \Drupal\Core\Entity\EntityAccessControlHandler::checkAccess */ public function testAccessDeleteDefault(): void { /** @var \Drupal\entity_test\Entity\EntityTestRevPub $entity */ @@ -144,7 +144,7 @@ public function testAccessDeleteDefault(): void { /** * Test can delete non-latest revision. * - * @covers \Drupal\Core\Entity\EntityRevisionAccessCheck::checkAccess + * @covers \Drupal\Core\Entity\EntityAccessControlHandler::checkAccess */ public function testAccessDeleteNonLatest(): void { /** @var \Drupal\entity_test\Entity\EntityTestRev $entity */ diff --git a/core/tests/Drupal/FunctionalTests/Entity/RevisionRevertFormTest.php b/core/tests/Drupal/FunctionalTests/Entity/RevisionRevertFormTest.php index 82d0d06d8c2b..98037f9c3078 100644 --- a/core/tests/Drupal/FunctionalTests/Entity/RevisionRevertFormTest.php +++ b/core/tests/Drupal/FunctionalTests/Entity/RevisionRevertFormTest.php @@ -93,7 +93,7 @@ public function providerPageTitle(): array { /** * Test cannot revert latest revision. * - * @covers \Drupal\Core\Entity\EntityRevisionAccessCheck::checkAccess + * @covers \Drupal\Core\Entity\EntityAccessControlHandler::checkAccess */ public function testAccessRevertLatest(): void { /** @var \Drupal\entity_test\Entity\EntityTestRev $entity */ @@ -111,7 +111,7 @@ public function testAccessRevertLatest(): void { /** * Test can revert non-latest revision. * - * @covers \Drupal\Core\Entity\EntityRevisionAccessCheck::checkAccess + * @covers \Drupal\Core\Entity\EntityAccessControlHandler::checkAccess */ public function testAccessRevertNonLatest(): void { /** @var \Drupal\entity_test\Entity\EntityTestRev $entity */ diff --git a/core/tests/Drupal/FunctionalTests/Entity/RevisionVersionHistoryTest.php b/core/tests/Drupal/FunctionalTests/Entity/RevisionVersionHistoryTest.php index 080a53ad9038..bcfb7e810f3e 100644 --- a/core/tests/Drupal/FunctionalTests/Entity/RevisionVersionHistoryTest.php +++ b/core/tests/Drupal/FunctionalTests/Entity/RevisionVersionHistoryTest.php @@ -62,7 +62,7 @@ public function testOrder(): void { /** * Test current revision is indicated. * - * @covers \Drupal\Core\Entity\Controller\RevisionControllerTrait::revisionOverview + * @covers \Drupal\Core\Entity\Controller\VersionHistoryController::revisionOverview */ public function testCurrentRevision(): void { /** @var \Drupal\entity_test\Entity\EntityTestRev $entity */ diff --git a/core/tests/Drupal/KernelTests/Core/Database/DriverSpecificSchemaTestBase.php b/core/tests/Drupal/KernelTests/Core/Database/DriverSpecificSchemaTestBase.php index 8581ea2222a0..519094f66be5 100644 --- a/core/tests/Drupal/KernelTests/Core/Database/DriverSpecificSchemaTestBase.php +++ b/core/tests/Drupal/KernelTests/Core/Database/DriverSpecificSchemaTestBase.php @@ -12,6 +12,8 @@ /** * Tests table creation and modification via the schema API. + * + * @coversDefaultClass \Drupal\Core\Database\Schema */ abstract class DriverSpecificSchemaTestBase extends DriverSpecificKernelTestBase { diff --git a/core/tests/Drupal/KernelTests/Core/Database/QueryTest.php b/core/tests/Drupal/KernelTests/Core/Database/QueryTest.php index d8e2188095b6..d5b6c9e865de 100644 --- a/core/tests/Drupal/KernelTests/Core/Database/QueryTest.php +++ b/core/tests/Drupal/KernelTests/Core/Database/QueryTest.php @@ -9,6 +9,7 @@ /** * Tests Drupal's extended prepared statement syntax.. * + * @coversDefaultClass \Drupal\Core\Database\Connection * @group Database */ class QueryTest extends DatabaseTestBase { diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityBaseTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityBaseTest.php index da14363cf4e1..1fc290575397 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityBaseTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityBaseTest.php @@ -29,7 +29,6 @@ protected function setUp(): void { * Tests that the correct entity adapter is returned. * * @covers ::getTypedData - * @covers ::getClass */ public function testGetTypedData() { $bundle = EntityTestBundle::create([ diff --git a/core/tests/Drupal/KernelTests/Core/Site/SettingsRewriteTest.php b/core/tests/Drupal/KernelTests/Core/Site/SettingsRewriteTest.php index 3955205e86d9..453c2c411327 100644 --- a/core/tests/Drupal/KernelTests/Core/Site/SettingsRewriteTest.php +++ b/core/tests/Drupal/KernelTests/Core/Site/SettingsRewriteTest.php @@ -10,13 +10,11 @@ * Tests the SettingsEditor::rewrite() function. * * @group system - * - * @covers \Drupal\Core\Site\SettingsEditor::rewrite() */ class SettingsRewriteTest extends KernelTestBase { /** - * Tests the SettingsEditor::rewrite() function. + * @covers \Drupal\Core\Site\SettingsEditor::rewrite */ public function testDrupalRewriteSettings() { include_once $this->root . '/core/includes/install.inc'; diff --git a/core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php b/core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php index fbdd45b36d9b..0baf1e19e7cb 100644 --- a/core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php +++ b/core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php @@ -159,7 +159,7 @@ public function testInstallThemeWithUnmetModuleDependencies($theme_name, $instal /** * Tests trying to install a deprecated theme. * - * @covers ::install + * @covers \Drupal\Core\Extension\ThemeInstaller::install * * @group legacy */ diff --git a/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php b/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php index e5e597d0c698..b04a9f4ac5e6 100644 --- a/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php +++ b/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php @@ -59,11 +59,6 @@ protected function setUp(): void { /** * Tests basic load/save/delete operations. - * - * @covers ::load - * @covers ::save - * @covers ::delete - * @covers ::exists */ public function testCRUD() { $php = new $this->storageClass($this->settings); diff --git a/core/tests/Drupal/Tests/Core/Database/DatabaseEventsTest.php b/core/tests/Drupal/Tests/Core/Database/DatabaseEventsTest.php index 81215fe8b26b..1b41198fc05e 100644 --- a/core/tests/Drupal/Tests/Core/Database/DatabaseEventsTest.php +++ b/core/tests/Drupal/Tests/Core/Database/DatabaseEventsTest.php @@ -32,8 +32,8 @@ protected function setUp(): void { /** * @covers ::isEventEnabled - * @covers ::enableEvent - * @covers ::disableEvent + * @covers ::enableEvents + * @covers ::disableEvents */ public function testEventEnablingAndDisabling(): void { $this->connection->enableEvents([ @@ -50,7 +50,7 @@ public function testEventEnablingAndDisabling(): void { } /** - * @covers ::enableEvent + * @covers ::enableEvents */ public function testEnableInvalidEvent(): void { $this->expectException(\AssertionError::class); @@ -59,7 +59,7 @@ public function testEnableInvalidEvent(): void { } /** - * @covers ::disableEvent + * @covers ::disableEvents */ public function testDisableInvalidEvent(): void { $this->expectException(\AssertionError::class); diff --git a/core/tests/Drupal/Tests/Core/Field/FieldFilteredMarkupTest.php b/core/tests/Drupal/Tests/Core/Field/FieldFilteredMarkupTest.php index b4c0e3382a95..b4b2ed07ecfa 100644 --- a/core/tests/Drupal/Tests/Core/Field/FieldFilteredMarkupTest.php +++ b/core/tests/Drupal/Tests/Core/Field/FieldFilteredMarkupTest.php @@ -47,7 +47,7 @@ public function providerTestCreate() { } /** - * @covers: ::displayAllowedTags + * @covers ::displayAllowedTags */ public function testdisplayAllowedTags() { $expected = '<a> <b> <big> <code> <del> <em> <i> <ins> <pre> <q> <small> <span> <strong> <sub> <sup> <tt> <ol> <ul> <li> <p> <br> <img>'; diff --git a/core/tests/Drupal/Tests/Core/Mail/Plugin/Mail/PhpMailTest.php b/core/tests/Drupal/Tests/Core/Mail/Plugin/Mail/PhpMailTest.php index ab641300b124..1654db55a089 100644 --- a/core/tests/Drupal/Tests/Core/Mail/Plugin/Mail/PhpMailTest.php +++ b/core/tests/Drupal/Tests/Core/Mail/Plugin/Mail/PhpMailTest.php @@ -102,7 +102,7 @@ protected function createPhpMailInstance(): PhpMail { /** * Tests sending a mail using a From address with a comma in it. * - * @covers ::testMail + * @covers ::mail */ public function testMail() { // Setup a mail message. diff --git a/core/tests/Drupal/Tests/Core/Routing/RouteMatchTestBase.php b/core/tests/Drupal/Tests/Core/Routing/RouteMatchTestBase.php index 6f9848a7ed7d..e37fc698cf8e 100644 --- a/core/tests/Drupal/Tests/Core/Routing/RouteMatchTestBase.php +++ b/core/tests/Drupal/Tests/Core/Routing/RouteMatchTestBase.php @@ -8,6 +8,8 @@ /** * Base test class for testing classes implementing the route match interface. + * + * @coversDefaultClass \Drupal\Core\Routing\RouteMatch */ abstract class RouteMatchTestBase extends UnitTestCase { -- GitLab