diff --git a/core/modules/config_translation/src/Tests/ConfigTranslationListUiTest.php b/core/modules/config_translation/src/Tests/ConfigTranslationListUiTest.php index 3d7c0c3..6482725 100644 --- a/core/modules/config_translation/src/Tests/ConfigTranslationListUiTest.php +++ b/core/modules/config_translation/src/Tests/ConfigTranslationListUiTest.php @@ -8,6 +8,7 @@ namespace Drupal\config_translation\Tests; use Drupal\Component\Utility\Unicode; +use Drupal\field\Entity\FieldStorageConfig; use Drupal\language\Entity\ConfigurableLanguage; use Drupal\simpletest\WebTestBase; @@ -389,6 +390,23 @@ public function doFieldListTest() { )); $content_type->save(); + // Create a block content type. + $block_content_type = entity_create('block_content_type', array( + 'id' => 'basic', + 'label' => 'Basic', + 'revision' => FALSE + )); + $block_content_type->save(); + $field = entity_create('field_config', array( + // The field storage is guaranteed to exist because it is supplied by the + // block_content module. + 'field_storage' => FieldStorageConfig::loadByName('block_content', 'body'), + 'bundle' => $block_content_type->id(), + 'label' => 'Body', + 'settings' => array('display_summary' => FALSE), + )); + $field->save(); + // Look at a few fields on a few entity types. $pages = array( array( diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateBlockContentTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateBlockContentTest.php index 9894bdd..30f6481 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateBlockContentTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateBlockContentTest.php @@ -10,6 +10,7 @@ use Drupal\Core\Language\Language; use Drupal\block_content\Entity\BlockContent; use Drupal\Core\Language\LanguageInterface; +use Drupal\field\Entity\FieldStorageConfig; use Drupal\migrate\MigrateExecutable; use Drupal\migrate_drupal\Tests\MigrateDrupalTestBase; @@ -27,6 +28,22 @@ class MigrateBlockContentTest extends MigrateDrupalTestBase { */ protected function setUp() { parent::setUp(); + $block_content_type = entity_create('block_content_type', array( + 'id' => 'basic', + 'label' => 'Basic', + 'revision' => FALSE + )); + $block_content_type->save(); + $field = entity_create('field_config', array( + // The field storage is guaranteed to exist because it is supplied by the + // block_content module. + 'field_storage' => FieldStorageConfig::loadByName('block_content', 'body'), + 'bundle' => $block_content_type->id(), + 'label' => 'Body', + 'settings' => array('display_summary' => FALSE), + )); + $field->save(); + $this->prepareMigrations(array( 'd6_filter_format' => array( array(array(2), array('full_html'))