ConfigEntityValidationTestBase::$propertiesWithRequiredKeys

Same name in other branches
  1. 11.x core/tests/Drupal/KernelTests/Core/Config/ConfigEntityValidationTestBase.php \Drupal\KernelTests\Core\Config\ConfigEntityValidationTestBase::propertiesWithRequiredKeys

The config entity mapping properties with >=1 required keys.

All top-level properties of a config entity are guaranteed to be defined (since they are defined as properties on the corresponding PHP class). That is why they can never trigger "required key" validation errors. Only for non-top-level properties can such validation errors be triggered, and hence that is only possible on top-level properties of `type: mapping`.

Type: string[]

See also

\Drupal\Core\Config\Entity\ConfigEntityType::getPropertiesToExport()

::testRequiredPropertyKeysMissing()

\Drupal\Core\Validation\Plugin\Validation\Constraint\ValidKeysConstraintValidator

File

core/tests/Drupal/KernelTests/Core/Config/ConfigEntityValidationTestBase.php, line 71

Class

ConfigEntityValidationTestBase
Base class for testing validation of config entities.

Namespace

Drupal\KernelTests\Core\Config

Code

protected static array $propertiesWithRequiredKeys = [];

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.