X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Ftests%2FDrupal%2FKernelTests%2FCore%2FEntity%2FFieldWidgetConstraintValidatorTest.php;fp=web%2Fcore%2Ftests%2FDrupal%2FKernelTests%2FCore%2FEntity%2FFieldWidgetConstraintValidatorTest.php;h=21eb4d97ee7f01051d7fe8cd60c88d04473ef460;hp=041b062f45260deca410a7d6f5f5129c64db9a33;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/web/core/tests/Drupal/KernelTests/Core/Entity/FieldWidgetConstraintValidatorTest.php b/web/core/tests/Drupal/KernelTests/Core/Entity/FieldWidgetConstraintValidatorTest.php index 041b062f4..21eb4d97e 100644 --- a/web/core/tests/Drupal/KernelTests/Core/Entity/FieldWidgetConstraintValidatorTest.php +++ b/web/core/tests/Drupal/KernelTests/Core/Entity/FieldWidgetConstraintValidatorTest.php @@ -15,7 +15,7 @@ use Drupal\KernelTests\KernelTestBase; */ class FieldWidgetConstraintValidatorTest extends KernelTestBase { - public static $modules = ['entity_test', 'field', 'user', 'system']; + public static $modules = ['entity_test', 'field', 'field_test', 'user', 'system']; /** * {@inheritdoc} @@ -54,7 +54,8 @@ class FieldWidgetConstraintValidatorTest extends KernelTestBase { $display->validateFormValues($entity, $form, $form_state); $errors = $form_state->getErrors(); - $this->assertEqual($errors['name'], 'Widget constraint has failed.', 'Constraint violation is generated correctly'); + $this->assertEqual($errors['name'], 'Widget constraint has failed.', 'Constraint violation at the field items list level is generated correctly'); + $this->assertEqual($errors['test_field'], 'Widget constraint has failed.', 'Constraint violation at the field items list level is generated correctly for an advanced widget'); } /**