Make assertions using ConfigEntityValidationTestBase::assertValidationErrors() clearer

Created on 21 March 2023, over 1 year ago
Updated 1 June 2023, over 1 year ago

Problem/Motivation

\Drupal\KernelTests\Core\Config\ConfigEntityValidationTestBase::assertValidationErrors() was introduced in ✨ Add validation constraints to config_entity.dependencies Fixed and currently just asserts an array of actual violation messages/validation error messages.

It'd be better to instead assert them based on the property path at which that validation error occurred, to avoid false positives. That's also what \Drupal\Tests\ckeditor5\Kernel\CKEditor5ValidationTestTrait::validatePairToViolationsArray() does.

Discovered this while working on πŸ“Œ New config schema data type: `required_label` Fixed .

Steps to reproduce

N/A

Proposed resolution

Improve it!

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

N/A

πŸ“Œ Task
Status

Fixed

Version

10.1 ✨

Component
Configuration entityΒ  β†’

Last updated about 1 hour ago

Created by

πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

Live updates comments and jobs are added and updated live.
  • Security improvements

    It makes Drupal less vulnerable to abuse or misuse. Note, this is the preferred tag, though the Security tag has a large body of issues tagged to it. Do NOT publicly disclose security vulnerabilities; contact the security team instead. Anyone (whether security team or not) can apply this tag to security improvements that do not directly present a vulnerability e.g. hardening an API to add filtering to reduce a common mistake in contributed modules.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024