diff --git a/core/modules/image/src/Tests/ImageFieldDefaultImagesTest.php b/core/modules/image/src/Tests/ImageFieldDefaultImagesTest.php index c33ca1e..7e56549 100644 --- a/core/modules/image/src/Tests/ImageFieldDefaultImagesTest.php +++ b/core/modules/image/src/Tests/ImageFieldDefaultImagesTest.php @@ -7,6 +7,7 @@ namespace Drupal\image\Tests; use Drupal\Component\Utility\Unicode; +use Drupal\Core\Entity\Entity\EntityViewDisplay; use Drupal\file\Entity\File; /** @@ -162,6 +163,11 @@ public function testDefaultImages() { ) ); + EntityViewDisplay::load('node.article.default') + ->setComponent($field_name, array('label' => 'hidden', 'type' => 'image')) + ->save(); + $this->drupalGet('node/' . $article->id()); + // Confirm that the image default is shown for a new page node. $page = $this->drupalCreateNode(array('type' => 'page')); $page_built = $this->drupalBuildEntityView($page);