Problem/Motivation

In core/modules/language/tests/src/Unit/ContentLanguageSettingsUnitTest.php, there are incorrect and misleading docblocks for class properties.

/**
   * The typed configuration manager used for testing.
   *
   * @var \Drupal\Core\Config\TypedConfigManagerInterface|\PHPUnit\Framework\MockObject\Stub
   */
  protected $typedConfigManager;

  /**
   * The typed configuration manager used for testing.
   *
   * @var \Drupal\Core\Config\Entity\ConfigEntityStorage
   */
  protected $configEntityStorageInterface;

Both properties have identical descriptions, but represent different types:

* $typedConfigManager correctly references TypedConfigManagerInterface (with a mock/stub).
* $configEntityStorageInterface incorrectly describes itself as a "typed configuration manager" while its actual type is ConfigEntityStorage.

This inconsistency reduces code clarity and may confuse developers and static analysis tools.

Steps to reproduce

1. Open the file: core/modules/language/tests/src/Unit/ContentLanguageSettingsUnitTest.php
2. Locate the following properties:

* $typedConfigManager
* $configEntityStorageInterface
3. Observe that both docblocks describe the same purpose despite different types.

Proposed resolution

Update the docblock for $configEntityStorageInterface to accurately reflect its purpose and type.

For example:

/**
 * The config entity storage used for testing.
 *
 * @var \Drupal\Core\Config\Entity\ConfigEntityStorage
 */
protected $configEntityStorageInterface;

Ensure the description matches the actual responsibility of the property.

Remaining tasks

None.

User interface changes

None.

---

Introduced terminology

None.

API changes

None.

Data model changes

None.

Release notes snippet

None.

Issue fork drupal-3582122

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

sivaji_ganesh_jojodae’s picture

Issue summary: View changes
sivaji_ganesh_jojodae’s picture

sivaji_ganesh_jojodae’s picture

Issue summary: View changes

shubham.prakash made their first commit to this issue’s fork.

shubham.prakash’s picture

Status: Active » Needs review
sivaji_ganesh_jojodae’s picture

Component: language system » phpunit

The MR looks fine but the Pipeline has failed. I've requested for re-run. +1 for the fix.

smustgrave’s picture

Component: phpunit » language.module
Status: Needs review » Needs work

This is just in the language module.

But this is the type of ticket that could be scoped more broadly vs by file or by module.

Can you do that search please.

smustgrave’s picture

Component: language.module » documentation

Actually better component

sivaji_ganesh_jojodae’s picture

FYI, this was identified while reviewing the MR for #3581407: Remove unused properties from unit tests. I haven’t verified whether similar incorrect property documentation exists elsewhere in core.

If this is a recurring pattern, the scope of the issue could potentially be expanded; otherwise, this can remain a targeted fix.

sivaji_ganesh_jojodae’s picture

Status: Needs work » Needs review
smustgrave’s picture

Think a search should be done else these little issues that aren’t addressing anything can come off spamy

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Left this for almost 2 months hoping a bigger search was done but will see what committers think

amateescu’s picture

Version: main » 11.x-dev
Status: Reviewed & tested by the community » Fixed

I'm not sure how easy it would be to search for mistakes like this, but I think it's a good task for a novice :)

Committed a59fd7d to main and 3ba1907 to 11.x. Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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