From df177314e546c99892fcb0114ba32446ddf36453 Mon Sep 17 00:00:00 2001
From: nod_ <nod_@598310.no-reply.drupal.org>
Date: Tue, 11 Mar 2025 10:46:19 +0100
Subject: [PATCH] Issue #3508581 by annmarysruthy, borisson_: Fix
 Drupal.Commenting.FunctionComment.Missing in Kernel tests

---
 .../tests/src/Kernel/ConfigActionsTest.php    | 12 +++
 .../AddItemToToolbarConfigActionTest.php      |  6 ++
 .../src/Kernel/WildcardHtmlSupportTest.php    |  3 +
 .../tests/src/Kernel/ConfigActionsTest.php    |  3 +
 .../AddModerationConfigActionTest.php         | 15 ++++
 .../tests/src/Kernel/ConfigActionsTest.php    |  3 +
 .../tests/src/Kernel/FieldStorageCrudTest.php |  3 +
 .../file/tests/src/Kernel/SaveTest.php        |  3 +
 .../tests/src/Kernel/ConfigActionsTest.php    |  3 +
 .../JsonApiTopLevelResourceNormalizerTest.php |  3 +
 .../tests/src/Kernel/ConfigActionsTest.php    |  3 +
 .../tests/src/Kernel/InlineBlockUsageTest.php |  3 +
 .../LocaleConfigurableLanguageManagerTest.php |  3 +
 .../Kernel/LocaleDefaultConfigStorageTest.php |  3 +
 .../tests/src/Kernel/ConfigActionsTest.php    |  3 +
 .../OEmbedResourceConstraintValidatorTest.php |  3 +
 .../Migrate/MigrateMenuSettingsTest.php       |  3 +
 .../tests/src/Kernel/ConfigActionsTest.php    |  3 +
 .../Views/RevisionCreateTimestampTest.php     |  3 +
 .../PathExcluder/UnknownPathExcluderTest.php  |  3 +
 .../tests/src/Kernel/RequestHandlerTest.php   | 12 +++
 .../DateFormatAccessControlHandlerTest.php    |  6 ++
 .../Kernel/MenuAccessControlHandlerTest.php   |  6 ++
 .../tests/src/Kernel/PendingRevisionTest.php  |  3 +
 .../Views/TaxonomyDefaultArgumentTest.php     |  6 ++
 .../tests/src/Kernel/UserRoleEntityTest.php   |  9 +++
 .../Kernel/Views/UserViewsFieldAccessTest.php |  3 +
 .../tests/src/Kernel/Handler/AreaTextTest.php |  3 +
 .../src/Kernel/Handler/ArgumentNullTest.php   |  6 ++
 .../EntityTestViewsFieldAccessTest.php        |  3 +
 .../src/Kernel/Handler/FieldBooleanTest.php   |  9 +++
 .../src/Kernel/Handler/FieldCounterTest.php   |  3 +
 .../src/Kernel/Handler/FieldFileSizeTest.php  |  9 +++
 .../tests/src/Kernel/Handler/FieldUrlTest.php |  6 ++
 .../src/Kernel/Handler/FilterCombineTest.php  |  3 +
 .../src/Kernel/Handler/FilterEqualityTest.php | 18 +++++
 .../Kernel/Handler/FilterInOperatorTest.php   | 18 +++++
 .../src/Kernel/Handler/FilterNumericTest.php  | 33 ++++++++
 .../src/Kernel/Handler/FilterStringTest.php   | 78 +++++++++++++++++++
 .../src/Kernel/Handler/HandlerAliasTest.php   |  3 +
 .../tests/src/Kernel/Handler/SortDateTest.php |  3 +
 .../Kernel/Plugin/ArgumentValidatorTest.php   |  3 +
 .../src/Kernel/Plugin/PluginBaseTest.php      |  3 +
 .../tests/src/Kernel/Plugin/QueryTest.php     |  6 ++
 .../Kernel/Plugin/SqlEntityLoadingTest.php    |  3 +
 .../tests/src/Kernel/ViewExecutableTest.php   |  6 ++
 core/phpcs.xml.dist                           |  1 +
 47 files changed, 346 insertions(+)

diff --git a/core/modules/block/tests/src/Kernel/ConfigActionsTest.php b/core/modules/block/tests/src/Kernel/ConfigActionsTest.php
index fd7fa6f34c92..cb41d7825131 100644
--- a/core/modules/block/tests/src/Kernel/ConfigActionsTest.php
+++ b/core/modules/block/tests/src/Kernel/ConfigActionsTest.php
@@ -49,6 +49,9 @@ protected function setUp(): void {
     $this->configActionManager = $this->container->get('plugin.manager.config_action');
   }
 
+  /**
+   * Tests the application of entity method actions on a block.
+   */
   public function testEntityMethodActions(): void {
     $block = $this->placeBlock('system_messages_block', ['theme' => 'olivero']);
     $this->assertSame('content', $block->getRegion());
@@ -80,6 +83,9 @@ public function testPlaceBlockActionOnlyWorksOnBlocks(string $action): void {
     $this->configActionManager->applyAction($action, 'user.role.anonymous', []);
   }
 
+  /**
+   * Verifies placeBlockInDefaultTheme action doesn't alter an existing block.
+   */
   public function testPlaceBlockActionDoesNotChangeExistingBlock(): void {
     $extant_region = Block::load('olivero_powered')->getRegion();
     $this->assertNotSame('content', $extant_region);
@@ -139,11 +145,17 @@ public function testPlaceBlockInStaticRegion(string $action, string $expected_th
     $this->assertSame('content', $block->getRegion());
   }
 
+  /**
+   * Tests placing a block in the default theme's region.
+   */
   public function testPlaceBlockInDefaultRegion(): void {
     $this->config('system.theme')->set('default', 'umami')->save();
     $this->testPlaceBlockInDynamicRegion('placeBlockInDefaultTheme', 'umami', 'content');
   }
 
+  /**
+   * Tests placing a block at the first and last position in a region.
+   */
   public function testPlaceBlockAtPosition(): void {
     // Ensure there's at least one block already in the region.
     $block = Block::create([
diff --git a/core/modules/ckeditor5/tests/src/Kernel/ConfigAction/AddItemToToolbarConfigActionTest.php b/core/modules/ckeditor5/tests/src/Kernel/ConfigAction/AddItemToToolbarConfigActionTest.php
index 836751ef8133..012743e855ed 100644
--- a/core/modules/ckeditor5/tests/src/Kernel/ConfigAction/AddItemToToolbarConfigActionTest.php
+++ b/core/modules/ckeditor5/tests/src/Kernel/ConfigAction/AddItemToToolbarConfigActionTest.php
@@ -95,6 +95,9 @@ public function testAddItemToToolbar(string|array $action, array $expected_toolb
     }
   }
 
+  /**
+   * Tests that adding non-existent toolbar item to CKEditor triggers an error.
+   */
   public function testAddNonExistentItem(): void {
     $recipe = $this->createRecipe([
       'name' => 'Add an invalid toolbar item',
@@ -112,6 +115,9 @@ public function testAddNonExistentItem(): void {
     RecipeRunner::processRecipe($recipe);
   }
 
+  /**
+   * Tests that the `addItemToToolbar` config action requires CKEditor 5.
+   */
   public function testActionRequiresCKEditor5(): void {
     $this->enableModules(['editor_test']);
     Editor::load('filter_test')?->setEditor('unicorn')->setSettings([])->save();
diff --git a/core/modules/ckeditor5/tests/src/Kernel/WildcardHtmlSupportTest.php b/core/modules/ckeditor5/tests/src/Kernel/WildcardHtmlSupportTest.php
index e1d57ed910a2..1373bc0a6665 100644
--- a/core/modules/ckeditor5/tests/src/Kernel/WildcardHtmlSupportTest.php
+++ b/core/modules/ckeditor5/tests/src/Kernel/WildcardHtmlSupportTest.php
@@ -101,6 +101,9 @@ function (ConstraintViolationInterface $v) {
     $this->assertEquals($expected_ghs_configuration, $ghs_configuration);
   }
 
+  /**
+   * Provides test cases for CKEditor 5 General HTML Support (GHS) configuration.
+   */
   public static function providerGhsConfiguration(): array {
     return [
       'empty source editing' => [
diff --git a/core/modules/contact/tests/src/Kernel/ConfigActionsTest.php b/core/modules/contact/tests/src/Kernel/ConfigActionsTest.php
index 31210efca435..a01027f482a3 100644
--- a/core/modules/contact/tests/src/Kernel/ConfigActionsTest.php
+++ b/core/modules/contact/tests/src/Kernel/ConfigActionsTest.php
@@ -34,6 +34,9 @@ protected function setUp(): void {
     $this->configActionManager = $this->container->get('plugin.manager.config_action');
   }
 
+  /**
+   * Tests the application of configuration actions on a contact form.
+   */
   public function testConfigActions(): void {
     $form = ContactForm::load('personal');
     $this->assertSame('Your message has been sent.', $form->getMessage());
diff --git a/core/modules/content_moderation/tests/src/Kernel/ConfigAction/AddModerationConfigActionTest.php b/core/modules/content_moderation/tests/src/Kernel/ConfigAction/AddModerationConfigActionTest.php
index 069390e1dd8e..df0e76408350 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ConfigAction/AddModerationConfigActionTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ConfigAction/AddModerationConfigActionTest.php
@@ -40,6 +40,9 @@ class AddModerationConfigActionTest extends KernelTestBase {
     'user',
   ];
 
+  /**
+   * Tests adding entity types and bundles to a workflow.
+   */
   public function testAddEntityTypeAndBundle(): void {
     $this->installEntitySchema('node');
     $this->installConfig('node');
@@ -58,6 +61,9 @@ public function testAddEntityTypeAndBundle(): void {
     $this->assertSame(['tags'], $plugin->getBundlesForEntityType('taxonomy_term'));
   }
 
+  /**
+   * Tests that the workflow must be of type Content Moderation.
+   */
   public function testWorkflowMustBeContentModeration(): void {
     $this->enableModules(['workflows', 'workflow_type_test']);
 
@@ -74,6 +80,9 @@ public function testWorkflowMustBeContentModeration(): void {
     RecipeRunner::processRecipe($recipe);
   }
 
+  /**
+   * Tests that the action only targets workflows.
+   */
   public function testActionOnlyTargetsWorkflows(): void {
     $recipe = $this->createRecipe('user.role.anonymous');
     $this->expectException(PluginNotFoundException::class);
@@ -81,6 +90,9 @@ public function testActionOnlyTargetsWorkflows(): void {
     RecipeRunner::processRecipe($recipe);
   }
 
+  /**
+   * Tests that the derived config action definitions have correct admin labels.
+   */
   public function testDeriverAdminLabel(): void {
     $this->enableModules(['workflows', 'content_moderation']);
 
@@ -92,6 +104,9 @@ public function testDeriverAdminLabel(): void {
     $this->assertSame('Add moderation to all vocabularies', (string) $definitions['add_moderation:addTaxonomyVocabularies']['admin_label']);
   }
 
+  /**
+   * Creates a recipe configuration for adding entity types and bundles to a workflow.
+   */
   private function createRecipe(string $config_name): Recipe {
     $recipe = <<<YAML
 name: 'Add entity types and bundles to workflow'
diff --git a/core/modules/field/tests/src/Kernel/ConfigActionsTest.php b/core/modules/field/tests/src/Kernel/ConfigActionsTest.php
index 15dc362a8be5..384dc1f9ffa6 100644
--- a/core/modules/field/tests/src/Kernel/ConfigActionsTest.php
+++ b/core/modules/field/tests/src/Kernel/ConfigActionsTest.php
@@ -41,6 +41,9 @@ protected function setUp(): void {
     $this->configActionManager = $this->container->get('plugin.manager.config_action');
   }
 
+  /**
+   * Tests the application of configuration actions on field settings.
+   */
   public function testConfigActions(): void {
     $field_storage = FieldStorageConfig::create([
       'field_name' => 'test',
diff --git a/core/modules/field/tests/src/Kernel/FieldStorageCrudTest.php b/core/modules/field/tests/src/Kernel/FieldStorageCrudTest.php
index 6b1af094365f..1d21ebd34b2a 100644
--- a/core/modules/field/tests/src/Kernel/FieldStorageCrudTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldStorageCrudTest.php
@@ -372,6 +372,9 @@ public function testDeleteNoData(): void {
     }
   }
 
+  /**
+   * Tests that updating a field storage type is not allowed.
+   */
   public function testUpdateFieldType(): void {
     $field_storage = FieldStorageConfig::create([
       'field_name' => 'field_type',
diff --git a/core/modules/file/tests/src/Kernel/SaveTest.php b/core/modules/file/tests/src/Kernel/SaveTest.php
index cd38137f977a..674236bbd1a5 100644
--- a/core/modules/file/tests/src/Kernel/SaveTest.php
+++ b/core/modules/file/tests/src/Kernel/SaveTest.php
@@ -17,6 +17,9 @@ class SaveTest extends FileManagedUnitTestBase {
 
   use UserCreationTrait;
 
+  /**
+   * Tests the saving process of file entities.
+   */
   public function testFileSave(): void {
     $account = $this->createUser();
     // Create a new file entity.
diff --git a/core/modules/image/tests/src/Kernel/ConfigActionsTest.php b/core/modules/image/tests/src/Kernel/ConfigActionsTest.php
index 1334d832f61a..dda3aa1acc55 100644
--- a/core/modules/image/tests/src/Kernel/ConfigActionsTest.php
+++ b/core/modules/image/tests/src/Kernel/ConfigActionsTest.php
@@ -32,6 +32,9 @@ protected function setUp(): void {
     $this->configActionManager = $this->container->get('plugin.manager.config_action');
   }
 
+  /**
+   * Tests adding an image effect using the configuration action manager.
+   */
   public function testConfigActions(): void {
     $style = ImageStyle::load('large');
     $this->assertCount(2, $style->getEffects());
diff --git a/core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiTopLevelResourceNormalizerTest.php b/core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiTopLevelResourceNormalizerTest.php
index ced2507e1384..38b7310972f9 100644
--- a/core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiTopLevelResourceNormalizerTest.php
+++ b/core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiTopLevelResourceNormalizerTest.php
@@ -909,6 +909,9 @@ public function testConfigEntityResourceObjectSchema(): void {
     $this->assertSame([], $validator->getErrors(), 'Validation errors on object ' . print_r($normalized, TRUE) . ' with schema ' . print_r($schema, TRUE));
   }
 
+  /**
+   * Tests the serialization of a top-level JSON:API document with a single resource.
+   */
   public function testTopLevelResourceWithSingleResource(): void {
     [, $resource_object] = $this->getTestContentEntityResource();
     $serializer = $this->container->get('jsonapi.serializer');
diff --git a/core/modules/language/tests/src/Kernel/ConfigActionsTest.php b/core/modules/language/tests/src/Kernel/ConfigActionsTest.php
index 0b159f746386..1a9474ed3ae1 100644
--- a/core/modules/language/tests/src/Kernel/ConfigActionsTest.php
+++ b/core/modules/language/tests/src/Kernel/ConfigActionsTest.php
@@ -32,6 +32,9 @@ protected function setUp(): void {
     $this->configActionManager = $this->container->get('plugin.manager.config_action');
   }
 
+  /**
+   * Tests the application of configuration actions on a language.
+   */
   public function testConfigActions(): void {
     $language = ConfigurableLanguage::load('en');
     $this->assertSame('English', $language->getName());
diff --git a/core/modules/layout_builder/tests/src/Kernel/InlineBlockUsageTest.php b/core/modules/layout_builder/tests/src/Kernel/InlineBlockUsageTest.php
index fd2d93945d19..2c890e222ce6 100644
--- a/core/modules/layout_builder/tests/src/Kernel/InlineBlockUsageTest.php
+++ b/core/modules/layout_builder/tests/src/Kernel/InlineBlockUsageTest.php
@@ -44,6 +44,9 @@ class InlineBlockUsageTest extends KernelTestBase {
    */
   protected EntityTest $entity;
 
+  /**
+   * {@inheritdoc}
+   */
   protected function setUp(): void {
     parent::setUp();
     $this->database = $this->container->get('database');
diff --git a/core/modules/locale/tests/src/Kernel/LocaleConfigurableLanguageManagerTest.php b/core/modules/locale/tests/src/Kernel/LocaleConfigurableLanguageManagerTest.php
index 49c598596f6d..5a2a07706b19 100644
--- a/core/modules/locale/tests/src/Kernel/LocaleConfigurableLanguageManagerTest.php
+++ b/core/modules/locale/tests/src/Kernel/LocaleConfigurableLanguageManagerTest.php
@@ -22,6 +22,9 @@ class LocaleConfigurableLanguageManagerTest extends KernelTestBase {
    */
   protected static $modules = ['language', 'locale'];
 
+  /**
+   * Tests retrieving languages from the language manager.
+   */
   public function testGetLanguages(): void {
     $this->installSchema('locale', ['locales_source', 'locales_target', 'locales_location']);
     $default_language = ConfigurableLanguage::create(['label' => $this->randomMachineName(), 'id' => 'default', 'weight' => 0]);
diff --git a/core/modules/locale/tests/src/Kernel/LocaleDefaultConfigStorageTest.php b/core/modules/locale/tests/src/Kernel/LocaleDefaultConfigStorageTest.php
index 34666b8b7fa0..c0b76119e2b9 100644
--- a/core/modules/locale/tests/src/Kernel/LocaleDefaultConfigStorageTest.php
+++ b/core/modules/locale/tests/src/Kernel/LocaleDefaultConfigStorageTest.php
@@ -23,6 +23,9 @@ class LocaleDefaultConfigStorageTest extends KernelTestBase {
     'locale_test_translate',
   ];
 
+  /**
+   * Tests retrieval of component names from locale default config storage.
+   */
   public function testGetComponentNames(): void {
     $storage = new LocaleDefaultConfigStorage(
       new NullStorage(),
diff --git a/core/modules/media/tests/src/Kernel/ConfigActionsTest.php b/core/modules/media/tests/src/Kernel/ConfigActionsTest.php
index 98e765c689a2..6da5d4d1419f 100644
--- a/core/modules/media/tests/src/Kernel/ConfigActionsTest.php
+++ b/core/modules/media/tests/src/Kernel/ConfigActionsTest.php
@@ -35,6 +35,9 @@ protected function setUp(): void {
     $this->configActionManager = $this->container->get('plugin.manager.config_action');
   }
 
+  /**
+   * Tests the application of configuration actions on a media type.
+   */
   public function testConfigActions(): void {
     $media_type = MediaType::load('test');
     $this->assertSame('Test type.', $media_type->getDescription());
diff --git a/core/modules/media/tests/src/Kernel/OEmbedResourceConstraintValidatorTest.php b/core/modules/media/tests/src/Kernel/OEmbedResourceConstraintValidatorTest.php
index 65ae4fe37f65..4edf12fd2f6d 100644
--- a/core/modules/media/tests/src/Kernel/OEmbedResourceConstraintValidatorTest.php
+++ b/core/modules/media/tests/src/Kernel/OEmbedResourceConstraintValidatorTest.php
@@ -118,6 +118,9 @@ public function __construct($entity) {
         $this->entity = $entity;
       }
 
+      /**
+       * Returns the test entity.
+       */
       public function getEntity(): Media {
         return $this->entity;
       }
diff --git a/core/modules/menu_ui/tests/src/Kernel/Migrate/MigrateMenuSettingsTest.php b/core/modules/menu_ui/tests/src/Kernel/Migrate/MigrateMenuSettingsTest.php
index 002906f1ce96..fbdc925042db 100644
--- a/core/modules/menu_ui/tests/src/Kernel/Migrate/MigrateMenuSettingsTest.php
+++ b/core/modules/menu_ui/tests/src/Kernel/Migrate/MigrateMenuSettingsTest.php
@@ -27,6 +27,9 @@ protected function setUp(): void {
     $this->executeMigration('menu_settings');
   }
 
+  /**
+   * Tests migration of menu_ui settings.
+   */
   public function testMigration(): void {
     $this->assertTrue(\Drupal::config('menu_ui.settings')->get('override_parent_selector'));
   }
diff --git a/core/modules/node/tests/src/Kernel/ConfigActionsTest.php b/core/modules/node/tests/src/Kernel/ConfigActionsTest.php
index 9a682cbe0d74..c24468451efa 100644
--- a/core/modules/node/tests/src/Kernel/ConfigActionsTest.php
+++ b/core/modules/node/tests/src/Kernel/ConfigActionsTest.php
@@ -37,6 +37,9 @@ protected function setUp(): void {
     $this->configActionManager = $this->container->get('plugin.manager.config_action');
   }
 
+  /**
+   * Tests the application of configuration actions on a node type.
+   */
   public function testConfigActions(): void {
     $node_type = $this->createContentType();
 
diff --git a/core/modules/node/tests/src/Kernel/Views/RevisionCreateTimestampTest.php b/core/modules/node/tests/src/Kernel/Views/RevisionCreateTimestampTest.php
index b9004855b57f..34ccc0c3e8d5 100644
--- a/core/modules/node/tests/src/Kernel/Views/RevisionCreateTimestampTest.php
+++ b/core/modules/node/tests/src/Kernel/Views/RevisionCreateTimestampTest.php
@@ -42,6 +42,9 @@ protected function setUp($import_test_views = TRUE): void {
     }
   }
 
+  /**
+   * Tests the revision create timestamp view.
+   */
   public function testRevisionCreateTimestampView(): void {
     $node_type = NodeType::create([
       'type' => 'article',
diff --git a/core/modules/package_manager/tests/src/Kernel/PathExcluder/UnknownPathExcluderTest.php b/core/modules/package_manager/tests/src/Kernel/PathExcluder/UnknownPathExcluderTest.php
index d68da1cba9aa..03913aa6c2bf 100644
--- a/core/modules/package_manager/tests/src/Kernel/PathExcluder/UnknownPathExcluderTest.php
+++ b/core/modules/package_manager/tests/src/Kernel/PathExcluder/UnknownPathExcluderTest.php
@@ -228,6 +228,9 @@ public function testExcluderCanBeDisabled(): void {
     $this->assertFileDoesNotExist($stage->getStageDirectory() . '/unknown/file.txt');
   }
 
+  /**
+   * Tests that path repositories are included.
+   */
   public function testPathRepositoriesAreIncluded(): void {
     $this->createTestProjectForTemplate(TRUE);
 
diff --git a/core/modules/rest/tests/src/Kernel/RequestHandlerTest.php b/core/modules/rest/tests/src/Kernel/RequestHandlerTest.php
index 3ce0238cfd7b..3e5606b8645e 100644
--- a/core/modules/rest/tests/src/Kernel/RequestHandlerTest.php
+++ b/core/modules/rest/tests/src/Kernel/RequestHandlerTest.php
@@ -105,12 +105,24 @@ public function testHandle(): void {
  */
 class StubRequestHandlerResourcePlugin extends ResourceBase {
 
+  /**
+   * Handles a GET request.
+   */
   public function get($example = NULL, ?Request $request = NULL) {}
 
+  /**
+   * Handles a POST request.
+   */
   public function post() {}
 
+  /**
+   * Handles a PATCH request.
+   */
   public function patch($data, Request $request) {}
 
+  /**
+   * Handles a DELETE request.
+   */
   public function delete() {}
 
 }
diff --git a/core/modules/system/tests/src/Kernel/DateFormatAccessControlHandlerTest.php b/core/modules/system/tests/src/Kernel/DateFormatAccessControlHandlerTest.php
index 0d5483370be8..6c8c42da59e8 100644
--- a/core/modules/system/tests/src/Kernel/DateFormatAccessControlHandlerTest.php
+++ b/core/modules/system/tests/src/Kernel/DateFormatAccessControlHandlerTest.php
@@ -70,6 +70,12 @@ public function testAccess($permissions, $which_entity, $view_label_access_resul
     static::assertEquals($create_access_result, $this->accessControlHandler->createAccess(NULL, $user, [], TRUE));
   }
 
+  /**
+   * Provides test cases for access control based on user permissions and entity lock status.
+   *
+   * @return array
+   *   An array of test cases.
+   */
   public static function providerTestAccess(): array {
     $c = new ContainerBuilder();
     $cache_contexts_manager = (new Prophet())->prophesize(CacheContextsManager::class);
diff --git a/core/modules/system/tests/src/Kernel/MenuAccessControlHandlerTest.php b/core/modules/system/tests/src/Kernel/MenuAccessControlHandlerTest.php
index 57e1758cb8f8..b8fcf1c51184 100644
--- a/core/modules/system/tests/src/Kernel/MenuAccessControlHandlerTest.php
+++ b/core/modules/system/tests/src/Kernel/MenuAccessControlHandlerTest.php
@@ -65,6 +65,12 @@ public function testAccess($permissions, $which_entity, $view_label_access_resul
     static::assertEquals($create_access_result, $this->accessControlHandler->createAccess(NULL, $user, [], TRUE));
   }
 
+  /**
+   * Provides test cases for menu access control based on user permissions and menu lock status.
+   *
+   * @return array
+   *   An array of test cases.
+   */
   public static function providerTestAccess(): array {
     // RefinableCacheableDependencyTrait::addCacheContexts() only needs the
     // container to perform an assertion, but we can't use the container here,
diff --git a/core/modules/taxonomy/tests/src/Kernel/PendingRevisionTest.php b/core/modules/taxonomy/tests/src/Kernel/PendingRevisionTest.php
index 0030b64b08c8..981676fe0c2a 100644
--- a/core/modules/taxonomy/tests/src/Kernel/PendingRevisionTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/PendingRevisionTest.php
@@ -121,6 +121,9 @@ public function testTaxonomyIndexWithPendingRevision(): void {
     $this->assertEquals($term->id(), $taxonomy_index[$node->id()]->tid);
   }
 
+  /**
+   * Retrieves the taxonomy index from the database.
+   */
   protected function getTaxonomyIndex() {
     return \Drupal::database()->select('taxonomy_index')
       ->fields('taxonomy_index')
diff --git a/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyDefaultArgumentTest.php b/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyDefaultArgumentTest.php
index eea33c764b12..afa6fda05c39 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyDefaultArgumentTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyDefaultArgumentTest.php
@@ -65,6 +65,9 @@ public function testNodePath(): void {
     $view->destroy();
   }
 
+  /**
+   * Tests the entity reference field using a view for selection.
+   */
   public function testNodePathWithViewSelection(): void {
     // Change the term entity reference field to use a view as selection plugin.
     \Drupal::service('module_installer')->install(['entity_reference_test']);
@@ -87,6 +90,9 @@ public function testNodePathWithViewSelection(): void {
     $this->assertEquals($this->nodes[0]->getCacheTags(), $view->argument['tid']->getPlugin('argument_default')->getCacheTags());
   }
 
+  /**
+   * Tests the behavior of term ID argument when accessing a term path.
+   */
   public function testTermPath(): void {
     $view = $this->initViewWithRequest($this->term1->toUrl()->toString());
 
diff --git a/core/modules/user/tests/src/Kernel/UserRoleEntityTest.php b/core/modules/user/tests/src/Kernel/UserRoleEntityTest.php
index 11c0f5f8aa8f..6a4695cfc5b9 100644
--- a/core/modules/user/tests/src/Kernel/UserRoleEntityTest.php
+++ b/core/modules/user/tests/src/Kernel/UserRoleEntityTest.php
@@ -31,6 +31,9 @@ public function register(ContainerBuilder $container): void {
       ->addTag('logger');
   }
 
+  /**
+   * Tests the order of granted permissions in a role.
+   */
   public function testOrderOfPermissions(): void {
     $role = Role::create(['id' => 'test_role', 'label' => 'Test role']);
     $role->grantPermission('b')
@@ -46,6 +49,9 @@ public function testOrderOfPermissions(): void {
     $this->assertEquals(['a', 'b', 'c'], $role->getPermissions());
   }
 
+  /**
+   * Tests granting non-existent permissions to a role.
+   */
   public function testGrantingNonExistentPermission(): void {
     $role = Role::create(['id' => 'test_role', 'label' => 'Test role']);
 
@@ -73,6 +79,9 @@ public function testGrantingNonExistentPermission(): void {
     $this->assertEmpty(array_intersect(['does not exist', 'also does not exist'], $permissions));
   }
 
+  /**
+   * Tests permission revocation during a configuration synchronization.
+   */
   public function testPermissionRevokeAndConfigSync(): void {
     $role = Role::create(['id' => 'test_role', 'label' => 'Test role']);
     $role->setSyncing(TRUE);
diff --git a/core/modules/user/tests/src/Kernel/Views/UserViewsFieldAccessTest.php b/core/modules/user/tests/src/Kernel/Views/UserViewsFieldAccessTest.php
index 2b7953cc9619..fffda3d83451 100644
--- a/core/modules/user/tests/src/Kernel/Views/UserViewsFieldAccessTest.php
+++ b/core/modules/user/tests/src/Kernel/Views/UserViewsFieldAccessTest.php
@@ -29,6 +29,9 @@ protected function setUp($import_test_views = TRUE): void {
     $this->installEntitySchema('user');
   }
 
+  /**
+   * Tests the user fields.
+   */
   public function testUserFields(): void {
     ConfigurableLanguage::createFromLangcode('es')->save();
     ConfigurableLanguage::createFromLangcode('fr')->save();
diff --git a/core/modules/views/tests/src/Kernel/Handler/AreaTextTest.php b/core/modules/views/tests/src/Kernel/Handler/AreaTextTest.php
index 089c37c90288..a96bb66e6520 100644
--- a/core/modules/views/tests/src/Kernel/Handler/AreaTextTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/AreaTextTest.php
@@ -37,6 +37,9 @@ protected function setUp($import_test_views = TRUE): void {
     $this->installEntitySchema('user');
   }
 
+  /**
+   * Tests the rendering of a text area.
+   */
   public function testAreaText(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = $this->container->get('renderer');
diff --git a/core/modules/views/tests/src/Kernel/Handler/ArgumentNullTest.php b/core/modules/views/tests/src/Kernel/Handler/ArgumentNullTest.php
index 8643ddcf0327..f48cbf89b40b 100644
--- a/core/modules/views/tests/src/Kernel/Handler/ArgumentNullTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/ArgumentNullTest.php
@@ -21,6 +21,9 @@ class ArgumentNullTest extends ViewsKernelTestBase {
    */
   public static $testViews = ['test_view'];
 
+  /**
+   * Defines Views data, setting the 'id' argument to use the null handler.
+   */
   public function viewsData() {
     $data = parent::viewsData();
     $data['views_test_data']['id']['argument']['id'] = 'null';
@@ -28,6 +31,9 @@ public function viewsData() {
     return $data;
   }
 
+  /**
+   * Tests the NullArgument handler for text areas.
+   */
   public function testAreaText(): void {
     // Test validation
     $view = Views::getView('test_view');
diff --git a/core/modules/views/tests/src/Kernel/Handler/EntityTestViewsFieldAccessTest.php b/core/modules/views/tests/src/Kernel/Handler/EntityTestViewsFieldAccessTest.php
index db630c9ac591..09a489e3105c 100644
--- a/core/modules/views/tests/src/Kernel/Handler/EntityTestViewsFieldAccessTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/EntityTestViewsFieldAccessTest.php
@@ -30,6 +30,9 @@ protected function setUp($import_test_views = TRUE): void {
     ConfigurableLanguage::create(['id' => 'es', 'title' => 'Spanish title', 'label' => 'Spanish label'])->save();
   }
 
+  /**
+   * Tests field access permissions for the 'entity_test' entity in Views.
+   */
   public function testEntityTestFields(): void {
     $entity_test = EntityTest::create([
       'name' => 'test entity name',
diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldBooleanTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldBooleanTest.php
index a60a3f13f50f..2d1c79b71c35 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FieldBooleanTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FieldBooleanTest.php
@@ -21,6 +21,9 @@ class FieldBooleanTest extends ViewsKernelTestBase {
    */
   public static $testViews = ['test_view'];
 
+  /**
+   * Modifies the default dataset by removing the age for specific entries.
+   */
   public function dataSet() {
     // Use default dataset but remove the age from john and paul
     $data = parent::dataSet();
@@ -29,12 +32,18 @@ public function dataSet() {
     return $data;
   }
 
+  /**
+   * Provides Views data definition for the 'age' field as a boolean.
+   */
   public function viewsData() {
     $data = parent::viewsData();
     $data['views_test_data']['age']['field']['id'] = 'boolean';
     return $data;
   }
 
+  /**
+   * Tests different display formats for a boolean field in Views.
+   */
   public function testFieldBoolean(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldCounterTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldCounterTest.php
index 5bf8f445fde9..b9b934c9e7ec 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FieldCounterTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FieldCounterTest.php
@@ -26,6 +26,9 @@ class FieldCounterTest extends ViewsKernelTestBase {
    */
   public static $testViews = ['test_view'];
 
+  /**
+   * Tests the behavior of a simple View rendering with overridden field options.
+   */
   public function testSimple(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldFileSizeTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldFileSizeTest.php
index f29de027ba4d..b897a7ad73eb 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FieldFileSizeTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FieldFileSizeTest.php
@@ -22,6 +22,9 @@ class FieldFileSizeTest extends ViewsKernelTestBase {
    */
   public static $testViews = ['test_view'];
 
+  /**
+   * Provides a dataset with various 'age' values representing file sizes.
+   */
   public function dataSet() {
     $data = parent::dataSet();
     $data[0]['age'] = 0;
@@ -32,6 +35,9 @@ public function dataSet() {
     return $data;
   }
 
+  /**
+   * Maps the 'age' field to the 'file_size' handler for Views.
+   */
   public function viewsData() {
     $data = parent::viewsData();
     $data['views_test_data']['age']['field']['id'] = 'file_size';
@@ -39,6 +45,9 @@ public function viewsData() {
     return $data;
   }
 
+  /**
+   * Tests the FileSize field handler for correct formatting in Views.
+   */
   public function testFieldFileSize(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldUrlTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldUrlTest.php
index 71437e6e7e0f..10386570842c 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FieldUrlTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FieldUrlTest.php
@@ -28,12 +28,18 @@ class FieldUrlTest extends ViewsKernelTestBase {
    */
   public static $testViews = ['test_view'];
 
+  /**
+   * Defines the Views data for the test entity.
+   */
   public function viewsData() {
     $data = parent::viewsData();
     $data['views_test_data']['name']['field']['id'] = 'url';
     return $data;
   }
 
+  /**
+   * Tests the rendering of a field as a plain text value and as a link.
+   */
   public function testFieldUrl(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
diff --git a/core/modules/views/tests/src/Kernel/Handler/FilterCombineTest.php b/core/modules/views/tests/src/Kernel/Handler/FilterCombineTest.php
index 437548477226..caf508cb95c2 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FilterCombineTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FilterCombineTest.php
@@ -48,6 +48,9 @@ protected function setUp($import_test_views = TRUE): void {
     $this->installEntitySchema('entity_test');
   }
 
+  /**
+   * Tests the Combine field filter with the 'contains' operator.
+   */
   public function testFilterCombineContains(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
diff --git a/core/modules/views/tests/src/Kernel/Handler/FilterEqualityTest.php b/core/modules/views/tests/src/Kernel/Handler/FilterEqualityTest.php
index a2ba005a0bdb..aeb4d145c1e0 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FilterEqualityTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FilterEqualityTest.php
@@ -35,12 +35,18 @@ class FilterEqualityTest extends ViewsKernelTestBase {
     'views_test_data_name' => 'name',
   ];
 
+  /**
+   * Defines Views data, mapping 'name' field to the equality filter.
+   */
   public function viewsData() {
     $data = parent::viewsData();
     $data['views_test_data']['name']['filter']['id'] = 'equality';
     return $data;
   }
 
+  /**
+   * Tests filtering names where the value matches exactly.
+   */
   public function testEqual(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
@@ -66,6 +72,9 @@ public function testEqual(): void {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
+  /**
+   * Tests grouped, exposed equality filtering.
+   */
   public function testEqualGroupedExposed(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = Views::getView('test_view');
@@ -86,6 +95,9 @@ public function testEqualGroupedExposed(): void {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
+  /**
+   * Tests filtering names using a not-equal condition.
+   */
   public function testNotEqual(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
@@ -120,6 +132,9 @@ public function testNotEqual(): void {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
+  /**
+   * Tests grouped, non-exposed inequality filtering.
+   */
   public function testEqualGroupedNotExposed(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = Views::getView('test_view');
@@ -149,6 +164,9 @@ public function testEqualGroupedNotExposed(): void {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
+  /**
+   * Provides grouped exposed filter options for the 'name' field.
+   */
   protected function getGroupedExposedFilters(): array {
     $filters = [
       'name' => [
diff --git a/core/modules/views/tests/src/Kernel/Handler/FilterInOperatorTest.php b/core/modules/views/tests/src/Kernel/Handler/FilterInOperatorTest.php
index e16e6f2cff87..e812d2fd4170 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FilterInOperatorTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FilterInOperatorTest.php
@@ -41,12 +41,18 @@ class FilterInOperatorTest extends ViewsKernelTestBase {
     'views_test_data_age' => 'age',
   ];
 
+  /**
+   * Defines Views data for the custom entity.
+   */
   public function viewsData() {
     $data = parent::viewsData();
     $data['views_test_data']['age']['filter']['id'] = 'in_operator';
     return $data;
   }
 
+  /**
+   * Tests filtering using the "IN" and "NOT IN" operators on the age field.
+   */
   public function testFilterInOperatorSimple(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
@@ -113,6 +119,9 @@ public function testFilterInOperatorSimple(): void {
     $this->assertIdenticalResultset($view, $expected_result, $this->columnMap);
   }
 
+  /**
+   * Tests filtering with grouped exposed filters using the "IN" operator.
+   */
   public function testFilterInOperatorGroupedExposedSimple(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = Views::getView('test_view');
@@ -139,6 +148,9 @@ public function testFilterInOperatorGroupedExposedSimple(): void {
     $this->assertIdenticalResultset($view, $expected_result, $this->columnMap);
   }
 
+  /**
+   * Tests filtering with grouped exposed filters using the "NOT IN" operator.
+   */
   public function testFilterNotInOperatorGroupedExposedSimple(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = Views::getView('test_view');
@@ -202,6 +214,12 @@ public function testFilterGroupedChangedIdentifier(): void {
     $this->assertIdenticalResultset($view, $expected_result, $this->columnMap);
   }
 
+  /**
+   * Returns grouped exposed filter definitions for Views.
+   *
+   * @return array
+   *   An array of grouped exposed filters.
+   */
   protected function getGroupedExposedFilters(): array {
     $filters = [
       'age' => [
diff --git a/core/modules/views/tests/src/Kernel/Handler/FilterNumericTest.php b/core/modules/views/tests/src/Kernel/Handler/FilterNumericTest.php
index 27deea250d00..b0a355f8dbdc 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FilterNumericTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FilterNumericTest.php
@@ -37,6 +37,9 @@ class FilterNumericTest extends ViewsKernelTestBase {
     'views_test_data_age' => 'age',
   ];
 
+  /**
+   * Defines Views data, allowing 'age' to be empty and 'id' to be required.
+   */
   public function viewsData() {
     $data = parent::viewsData();
     $data['views_test_data']['age']['filter']['allow empty'] = TRUE;
@@ -45,6 +48,9 @@ public function viewsData() {
     return $data;
   }
 
+  /**
+   * Tests filtering records using an exact match on a numeric field.
+   */
   public function testFilterNumericSimple(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
@@ -71,6 +77,9 @@ public function testFilterNumericSimple(): void {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
+  /**
+   * Tests filtering using exposed grouped filters.
+   */
   public function testFilterNumericExposedGroupedSimple(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = Views::getView('test_view');
@@ -195,6 +204,9 @@ public static function providerTestFilterNumericBetween() {
     ];
   }
 
+  /**
+   * Tests filtering records using a ranged condition on a numeric field.
+   */
   public function testFilterNumericExposedGroupedBetween(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = Views::getView('test_view');
@@ -224,6 +236,9 @@ public function testFilterNumericExposedGroupedBetween(): void {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
+  /**
+   * Tests filtering records outside a specified numeric range.
+   */
   public function testFilterNumericExposedGroupedNotBetween(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = Views::getView('test_view');
@@ -388,6 +403,9 @@ public function testFilterNumericExposedGroupedNotRegularExpression(): void {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
+  /**
+   * Tests filtering records based on empty and non-empty values.
+   */
   public function testFilterNumericEmpty(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
@@ -447,6 +465,9 @@ public function testFilterNumericEmpty(): void {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
+  /**
+   * Tests filtering exposed grouped records based on empty values.
+   */
   public function testFilterNumericExposedGroupedEmpty(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = Views::getView('test_view');
@@ -463,6 +484,9 @@ public function testFilterNumericExposedGroupedEmpty(): void {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
+  /**
+   * Tests filtering exposed grouped records based on non-empty values.
+   */
   public function testFilterNumericExposedGroupedNotEmpty(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = Views::getView('test_view');
@@ -500,6 +524,9 @@ public function testFilterNumericExposedGroupedNotEmpty(): void {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
+  /**
+   * Tests whether empty filters are allowed for specific fields.
+   */
   public function testAllowEmpty(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
@@ -530,6 +557,12 @@ public function testAllowEmpty(): void {
     $this->assertTrue(isset($age_operators['not empty']));
   }
 
+  /**
+   * Returns predefined grouped filter configurations for 'age'.
+   *
+   * @return array
+   *   An array of grouped exposed filters.
+   */
   protected function getGroupedExposedFilters(): array {
     $filters = [
       'age' => [
diff --git a/core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php b/core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php
index c05b04ad18ce..96d7f91c6fc9 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php
@@ -37,6 +37,9 @@ class FilterStringTest extends ViewsKernelTestBase {
     'views_test_data_name' => 'name',
   ];
 
+  /**
+   * Defines Views data for the custom entity.
+   */
   public function viewsData() {
     $data = parent::viewsData();
     $data['views_test_data']['name']['filter']['allow empty'] = TRUE;
@@ -92,6 +95,9 @@ protected function getBasicPageView() {
     return $view;
   }
 
+  /**
+   * Tests the string filter with the 'equal' operator.
+   */
   public function testFilterStringEqual(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
@@ -156,6 +162,9 @@ public function testFilterStringEqual(): void {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
+  /**
+   * Returns a set of grouped exposed filters.
+   */
   public function testFilterStringGroupedExposedEqual(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = $this->getBasicPageView();
@@ -177,6 +186,9 @@ public function testFilterStringGroupedExposedEqual(): void {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
+  /**
+   * Tests the string filter with the 'not equal' operator.
+   */
   public function testFilterStringNotEqual(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
@@ -211,6 +223,9 @@ public function testFilterStringNotEqual(): void {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
+  /**
+   * Tests grouped, exposed filtering with not equal operator.
+   */
   public function testFilterStringGroupedExposedNotEqual(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = $this->getBasicPageView();
@@ -242,6 +257,9 @@ public function testFilterStringGroupedExposedNotEqual(): void {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
+  /**
+   * Tests the string filter with the 'contains' operator.
+   */
   public function testFilterStringContains(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
@@ -267,6 +285,9 @@ public function testFilterStringContains(): void {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
+  /**
+   * Tests grouped, exposed filtering with contains operator.
+   */
   public function testFilterStringGroupedExposedContains(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = $this->getBasicPageView();
@@ -288,6 +309,9 @@ public function testFilterStringGroupedExposedContains(): void {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
+  /**
+   * Tests filtering by a word in the "description" field.
+   */
   public function testFilterStringWord(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
@@ -376,6 +400,9 @@ public function testFilterStringWord(): void {
     $this->assertIdenticalResultset($view, $resultset);
   }
 
+  /**
+   * Tests grouped and exposed filters with word-based filtering.
+   */
   public function testFilterStringGroupedExposedWord(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = $this->getBasicPageView();
@@ -417,6 +444,9 @@ public function testFilterStringGroupedExposedWord(): void {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
+  /**
+   * Tests filtering by string using the "starts with" operator.
+   */
   public function testFilterStringStarts(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
@@ -442,6 +472,9 @@ public function testFilterStringStarts(): void {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
+  /**
+   * Tests grouped and exposed filters with the "starts with" operator.
+   */
   public function testFilterStringGroupedExposedStarts(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = $this->getBasicPageView();
@@ -495,6 +528,9 @@ public function testFilterStringGroupedNotRegularExpression(): void {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
+  /**
+   * Tests filtering by string using the "does not start with" operator.
+   */
   public function testFilterStringNotStarts(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
@@ -527,6 +563,9 @@ public function testFilterStringNotStarts(): void {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
+  /**
+   * Tests grouped and exposed filters with the "does not start with" operator.
+   */
   public function testFilterStringGroupedExposedNotStarts(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = $this->getBasicPageView();
@@ -554,6 +593,9 @@ public function testFilterStringGroupedExposedNotStarts(): void {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
+  /**
+   * Tests filtering by string using the "ends with" operator.
+   */
   public function testFilterStringEnds(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
@@ -582,6 +624,9 @@ public function testFilterStringEnds(): void {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
+  /**
+   * Tests grouped and exposed filters with the "ends with" operator.
+   */
   public function testFilterStringGroupedExposedEnds(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = $this->getBasicPageView();
@@ -605,6 +650,9 @@ public function testFilterStringGroupedExposedEnds(): void {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
+  /**
+   * Tests filtering by string using the "does not end with" operator.
+   */
   public function testFilterStringNotEnds(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
@@ -634,6 +682,9 @@ public function testFilterStringNotEnds(): void {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
+  /**
+   * Tests grouped and exposed filters with the "does not end with" operator.
+   */
   public function testFilterStringGroupedExposedNotEnds(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = $this->getBasicPageView();
@@ -658,6 +709,9 @@ public function testFilterStringGroupedExposedNotEnds(): void {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
+  /**
+   * Tests filtering by string using the "does not contain" operator.
+   */
   public function testFilterStringNot(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
@@ -687,6 +741,9 @@ public function testFilterStringNot(): void {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
+  /**
+   * Tests grouped and exposed filters with the "does not contain" operator.
+   */
   public function testFilterStringGroupedExposedNot(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = $this->getBasicPageView();
@@ -712,6 +769,9 @@ public function testFilterStringGroupedExposedNot(): void {
 
   }
 
+  /**
+   * Tests filtering by string using the "shorter than" operator.
+   */
   public function testFilterStringShorter(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
@@ -740,6 +800,9 @@ public function testFilterStringShorter(): void {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
+  /**
+   * Tests grouped and exposed filters with the "shorter than" operator.
+   */
   public function testFilterStringGroupedExposedShorter(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = $this->getBasicPageView();
@@ -762,6 +825,9 @@ public function testFilterStringGroupedExposedShorter(): void {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
+  /**
+   * Tests filtering by string using the "longer than" operator.
+   */
   public function testFilterStringLonger(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
@@ -787,6 +853,9 @@ public function testFilterStringLonger(): void {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
+  /**
+   * Tests grouped and exposed filters with the "longer than" operator.
+   */
   public function testFilterStringGroupedExposedLonger(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = $this->getBasicPageView();
@@ -806,6 +875,9 @@ public function testFilterStringGroupedExposedLonger(): void {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
+  /**
+   * Tests filtering by string using the "empty" operator.
+   */
   public function testFilterStringEmpty(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
@@ -830,6 +902,9 @@ public function testFilterStringEmpty(): void {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
+  /**
+   * Tests grouped and exposed filters with the "empty" operator.
+   */
   public function testFilterStringGroupedExposedEmpty(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = $this->getBasicPageView();
@@ -892,6 +967,9 @@ public function testFilterStringNotRegularExpression(): void {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
+  /**
+   * Returns a set of grouped exposed filters.
+   */
   protected function getGroupedExposedFilters(): array {
     $filters = [
       'name' => [
diff --git a/core/modules/views/tests/src/Kernel/Handler/HandlerAliasTest.php b/core/modules/views/tests/src/Kernel/Handler/HandlerAliasTest.php
index 26d9ab1c7365..a66bd9b4c89a 100644
--- a/core/modules/views/tests/src/Kernel/Handler/HandlerAliasTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/HandlerAliasTest.php
@@ -48,6 +48,9 @@ protected function viewsData() {
     return $data;
   }
 
+  /**
+   * Tests the behavior of plugin aliases in Views filters.
+   */
   public function testPluginAliases(): void {
     $view = Views::getView('test_filter');
     $view->initDisplay();
diff --git a/core/modules/views/tests/src/Kernel/Handler/SortDateTest.php b/core/modules/views/tests/src/Kernel/Handler/SortDateTest.php
index 65a4c8921599..a1d72775a75a 100644
--- a/core/modules/views/tests/src/Kernel/Handler/SortDateTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/SortDateTest.php
@@ -21,6 +21,9 @@ class SortDateTest extends ViewsKernelTestBase {
    */
   public static $testViews = ['test_view'];
 
+  /**
+   * Generates an expected result set based on the specified granularity and order.
+   */
   protected function expectedResultSet($granularity, $reverse = TRUE): array {
     $expected = [];
     if (!$reverse) {
diff --git a/core/modules/views/tests/src/Kernel/Plugin/ArgumentValidatorTest.php b/core/modules/views/tests/src/Kernel/Plugin/ArgumentValidatorTest.php
index 64d3b00e7b58..1b87608044a4 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/ArgumentValidatorTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/ArgumentValidatorTest.php
@@ -22,6 +22,9 @@ class ArgumentValidatorTest extends ViewsKernelTestBase {
    */
   public static $testViews = ['test_view_argument_validate_numeric', 'test_view'];
 
+  /**
+   * Tests numeric argument validation in a view.
+   */
   public function testArgumentValidateNumeric(): void {
     $view = Views::getView('test_view_argument_validate_numeric');
     $view->initHandlers();
diff --git a/core/modules/views/tests/src/Kernel/Plugin/PluginBaseTest.php b/core/modules/views/tests/src/Kernel/Plugin/PluginBaseTest.php
index 42a3624e25da..3a400ce4565b 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/PluginBaseTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/PluginBaseTest.php
@@ -88,6 +88,9 @@ public function __construct() {
     parent::__construct([], '', []);
   }
 
+  /**
+   * {@inheritdoc}
+   */
   public function viewsTokenReplace($text, $tokens) {
     return parent::viewsTokenReplace($text, $tokens);
   }
diff --git a/core/modules/views/tests/src/Kernel/Plugin/QueryTest.php b/core/modules/views/tests/src/Kernel/Plugin/QueryTest.php
index 22276d9e2dbb..bbd45990a2d9 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/QueryTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/QueryTest.php
@@ -22,6 +22,9 @@ class QueryTest extends ViewsKernelTestBase {
    */
   public static $testViews = ['test_view'];
 
+  /**
+   * Provides Views metadata for the test data table.
+   */
   protected function viewsData() {
     $data = parent::viewsData();
     $data['views_test_data']['table']['base']['query_id'] = 'query_test';
@@ -49,6 +52,9 @@ public function _testInitQuery(): void {
     $this->assertInstanceOf(QueryTestPlugin::class, $view->query);
   }
 
+  /**
+   * Executes the views query, ensures it's not empty.
+   */
   public function _testQueryExecute(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
diff --git a/core/modules/views/tests/src/Kernel/Plugin/SqlEntityLoadingTest.php b/core/modules/views/tests/src/Kernel/Plugin/SqlEntityLoadingTest.php
index 571f8d0ce085..1b3a2a38ad5c 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/SqlEntityLoadingTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/SqlEntityLoadingTest.php
@@ -39,6 +39,9 @@ protected function setUp($import_test_views = TRUE): void {
     $this->installSchema('node', 'node_access');
   }
 
+  /**
+   * Tests entity loading with a non-default pending revision in Views.
+   */
   public function testViewWithNonDefaultPendingRevision(): void {
     $node_type = NodeType::create([
       'type' => 'page',
diff --git a/core/modules/views/tests/src/Kernel/ViewExecutableTest.php b/core/modules/views/tests/src/Kernel/ViewExecutableTest.php
index 011d0af37542..13232ef15452 100644
--- a/core/modules/views/tests/src/Kernel/ViewExecutableTest.php
+++ b/core/modules/views/tests/src/Kernel/ViewExecutableTest.php
@@ -92,6 +92,9 @@ class ViewExecutableTest extends ViewsKernelTestBase {
     'parent_views',
   ];
 
+  /**
+   * Sets up the necessary fixtures for the test environment.
+   */
   protected function setUpFixtures(): void {
     $this->installEntitySchema('user');
     $this->installEntitySchema('node');
@@ -207,6 +210,9 @@ public function testProperties(): void {
     $this->assertEquals([], $view->getExposedInput());
   }
 
+  /**
+   * Tests setting a display with an invalid display ID.
+   */
   public function testSetDisplayWithInvalidDisplay(): void {
     \Drupal::service('module_installer')->install(['dblog']);
     $view = Views::getView('test_executable_displays');
diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist
index 455c074e5c66..56abaf1edc7f 100644
--- a/core/phpcs.xml.dist
+++ b/core/phpcs.xml.dist
@@ -84,6 +84,7 @@
     <include-pattern>core/modules/*/Plugin/views/style/*</include-pattern>
     <include-pattern>*/Database/*</include-pattern>
     <include-pattern>*/FunctionalJavascript/*</include-pattern>
+    <include-pattern>*/Kernel/*</include-pattern>
     <include-pattern>*/Functional/*</include-pattern>
   </rule>
   <rule ref="Drupal.Commenting.FunctionComment.MissingParamType"/>
-- 
GitLab