diff --git a/core/modules/email/lib/Drupal/email/Tests/EmailFieldTest.php b/core/modules/email/lib/Drupal/email/Tests/EmailFieldTest.php index 60fd532..ad1ec2e 100644 --- a/core/modules/email/lib/Drupal/email/Tests/EmailFieldTest.php +++ b/core/modules/email/lib/Drupal/email/Tests/EmailFieldTest.php @@ -90,6 +90,9 @@ function testEmailField() { )) ->save(); + // Rebuild field info to check if email field still working. + field_sync_field_status(); + // Display creation form. $this->drupalGet('entity_test/add'); $this->assertFieldByName("{$field_name}[0][value]", '', 'Widget found.'); @@ -106,13 +109,14 @@ function testEmailField() { preg_match('|entity_test/manage/(\d+)|', $this->url, $match); $id = $match[1]; $this->assertText(t('entity_test @id has been created.', array('@id' => $id))); - $this->assertRaw($value); - - // Verify that a mailto link is displayed. - $entity = entity_load('entity_test', $id); - $display = entity_get_display($entity->entityType(), $entity->bundle(), 'full'); - $entity->content = field_attach_view($entity, $display); - $this->drupalSetContent(drupal_render($entity->content)); - $this->assertLinkByHref('mailto:test@example.com'); + + if ($this->assertRaw($value)) { + // Verify that a mailto link is displayed. + $entity = entity_load('entity_test', $id); + $display = entity_get_display($entity->entityType(), $entity->bundle(), 'full'); + $entity->content = field_attach_view($entity, $display); + $this->drupalSetContent(drupal_render($entity->content)); + $this->assertLinkByHref('mailto:test@example.com'); + } } } diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceFieldDefaultValueTest.php b/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceFieldDefaultValueTest.php index 7d61f3d..d5271fc 100644 --- a/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceFieldDefaultValueTest.php +++ b/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceFieldDefaultValueTest.php @@ -69,6 +69,9 @@ function testEntityReferenceDefaultValue() { )); $this->instance->save(); + // Rebuild field info to check if entity_reference field still working. + field_sync_field_status(); + // Set created node as default_value. $instance_edit = array( 'default_value_input[' . $this->field->name . '][0][target_id]' => $referenced_node->getTitle() . ' (' .$referenced_node->id() . ')',