Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This is a subissue of #2012776: [META] Improve validation constraint test coverage
This is a test for the Constraint Validation: ComplexDataConstraintValidator
Comment | File | Size | Author |
---|---|---|---|
#9 | d8_complex_data_constraint.interdiff.txt | 1.19 KB | fago |
#9 | d8_complex_data_constraint.patch | 3.4 KB | fago |
#4 | d8_complex_data_constraint.patch | 3.38 KB | fago |
#4 | d8_complex_data_constraint.interdiff.txt | 3.37 KB | fago |
#2 | drupal-test_for_ComplexDataConstraintValidator-2142991-2.patch | 2.8 KB | mariancalinro |
Comments
Comment #1
mariancalinro CreditAttribution: mariancalinro commentedComment #2
mariancalinro CreditAttribution: mariancalinro commentedComment #3
fagoIt's all tests, so "Complex data constraint" should be enough.
unnecessary empty line
Summary should fit in 80chars, so best split it in a summary and additional explanation.
Misses spaces after the commas.
I'm wondering what happens when we pass a map without the "key" being set.
Imo, it should be ignored when the value is not set as you have to add a NotNull constraint for what should be required. Howsoever, we should add a case for that as well.
Comment #4
fagoAdressed the remarks and extended the test-coverage for the case mentioned in 5.
Comment #5
fago4: d8_complex_data_constraint.patch queued for re-testing.
Comment #6
yched CreditAttribution: yched commentedMinor: s/Not existing key /Constraint on non-existing key/ ?
Otherwise, same as #2142981-11: Test for AllowedValuesConstraintValidator : would be really nice to get #2132145: Rename 'typed_data' / Drupal::typedData() to 'typed_data_manager' / Drupal::typedDataManager committed...
Comment #7
Berdir4: d8_complex_data_constraint.patch queued for re-testing.
Comment #9
fagoAddressed #6 and updated to account for the rename.
Comment #10
yched CreditAttribution: yched commented$this->typedData could be renamed accordingly ;-) The point of the rename wsa to remove the naming confusion between data items and their factoty.
Nitpick though. Otherwise RTBC
Comment #11
webchickCommitted and pushed to 8.x. Thanks!