diff -u b/core/modules/system/tests/modules/entity_test/src/EntityTestForm.php b/core/modules/system/tests/modules/entity_test/src/EntityTestForm.php --- b/core/modules/system/tests/modules/entity_test/src/EntityTestForm.php +++ b/core/modules/system/tests/modules/entity_test/src/EntityTestForm.php @@ -13,6 +13,8 @@ */ class EntityTestForm extends ContentEntityForm { + protected $validatedEntity; + /** * {@inheritdoc} */ @@ -49,7 +51,6 @@ */ public function validateForm(array &$form, FormStateInterface $form_state) { $entity = parent::validateForm($form, $form_state); - if (\Drupal::state()->get('test_ensure_saving_the_validated_entity')) { // Store the entity for comparision later in ::save. $this->validatedEntity = $entity;