diff --git a/core/modules/field/lib/Drupal/field/Tests/FieldAttachOtherTest.php b/core/modules/field/lib/Drupal/field/Tests/FieldAttachOtherTest.php index 1654719..b8632a4 100644 --- a/core/modules/field/lib/Drupal/field/Tests/FieldAttachOtherTest.php +++ b/core/modules/field/lib/Drupal/field/Tests/FieldAttachOtherTest.php @@ -429,13 +429,13 @@ function testFieldAttachExtractFormValues() { $expected_values[] = array('value' => $values[$key]['value']); } } - $this->assertIdentical($entity->{$this->field_name}->getValue(), $expected_values);//, 'Submit filters empty values'); + $this->assertIdentical($entity->{$this->field_name}->getValue(), $expected_values, 'Submit filters empty values'); foreach ($weights_2 as $key => $value) { if ($key != 1) { $expected_values_2[] = array('value' => $values_2[$key]['value']); } } - $this->assertIdentical($entity->{$this->field_name_2}->getValue(), $expected_values_2);//, 'Submit filters empty values'); + $this->assertIdentical($entity->{$this->field_name_2}->getValue(), $expected_values_2, 'Submit filters empty values'); // Call field_attach_extract_form_values() for a single field (the second field). $options = array('field_name' => $this->field_name_2); @@ -447,8 +447,8 @@ function testFieldAttachExtractFormValues() { $expected_values_2[] = array('value' => $values_2[$key]['value']); } } - $this->assertTrue($entity->{$this->field_name}->isEmpty());//, 'The first field does is empty in the entity object'); - $this->assertIdentical($entity->{$this->field_name_2}->getValue(), $expected_values_2);//, 'Submit filters empty values'); + $this->assertTrue($entity->{$this->field_name}->isEmpty(), 'The first field does is empty in the entity object'); + $this->assertIdentical($entity->{$this->field_name_2}->getValue(), $expected_values_2, 'Submit filters empty values'); } } diff --git a/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/field/field_type/TestItem.php b/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/field/field_type/TestItem.php index a22fbab..316eadd 100644 --- a/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/field/field_type/TestItem.php +++ b/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/field/field_type/TestItem.php @@ -79,13 +79,6 @@ public static function schema(FieldInterface $field) { /** * {@inheritdoc} */ - public function applyDefaultValue($notify = TRUE) { - $this->setValue(array('value' => 99), $notify); - } - - /** - * {@inheritdoc} - */ public function settingsForm(array $form, array &$form_state, $has_data) { $form['test_field_setting'] = array( '#type' => 'textfield', @@ -125,6 +118,14 @@ public function prepareCache() { /** * {@inheritdoc} */ + public function delete() { + // In D7 it was hook_field_delete(). + field_test_memorize('field_test_field_delete', array($this->getEntity())); + } + + /** + * {@inheritdoc} + */ public function getConstraints() { $constraint_manager = \Drupal::typedData()->getValidationConstraintManager(); $constraints = parent::getConstraints();