diff --git a/core/modules/config/src/Tests/ConfigImportRecreateTest.php b/core/modules/config/src/Tests/ConfigImportRecreateTest.php index 4dcf90c..264c87f 100644 --- a/core/modules/config/src/Tests/ConfigImportRecreateTest.php +++ b/core/modules/config/src/Tests/ConfigImportRecreateTest.php @@ -65,6 +65,7 @@ public function testRecreateEntity() { 'name' => 'Node type one', )); $content_type->save(); + node_add_body_field($content_type); /** @var \Drupal\Core\Config\StorageInterface $active */ $active = $this->container->get('config.storage'); /** @var \Drupal\Core\Config\StorageInterface $staging */ @@ -83,6 +84,7 @@ public function testRecreateEntity() { 'name' => 'Node type two', )); $content_type->save(); + node_add_body_field($content_type); $this->configImporter->reset(); // A node type, a field, a field instance an entity view display and an diff --git a/core/modules/config_translation/src/Tests/ConfigTranslationListUiTest.php b/core/modules/config_translation/src/Tests/ConfigTranslationListUiTest.php index 444274b..2280b4e 100644 --- a/core/modules/config_translation/src/Tests/ConfigTranslationListUiTest.php +++ b/core/modules/config_translation/src/Tests/ConfigTranslationListUiTest.php @@ -232,11 +232,10 @@ public function doContactFormsListTest() { public function doContentTypeListTest() { // Create a test content type to decouple looking for translate operations // link so this does not test more than necessary. - $content_type = entity_create('node_type', array( + $content_type = $this->drupalCreateContentType(array( 'type' => Unicode::strtolower($this->randomMachineName(16)), 'name' => $this->randomMachineName(), )); - $content_type->save(); // Get the content type listing. $this->drupalGet('admin/structure/types'); @@ -384,11 +383,10 @@ public function doResponsiveImageListTest() { */ public function doFieldListTest() { // Create a base content type. - $content_type = entity_create('node_type', array( + $content_type = $this->drupalCreateContentType(array( 'type' => Unicode::strtolower($this->randomMachineName(16)), 'name' => $this->randomMachineName(), )); - $content_type->save(); // Look at a few fields on a few entity types. $pages = array( diff --git a/core/modules/editor/src/Tests/EditorFileUsageTest.php b/core/modules/editor/src/Tests/EditorFileUsageTest.php index c9721d9..ec0a2dc 100644 --- a/core/modules/editor/src/Tests/EditorFileUsageTest.php +++ b/core/modules/editor/src/Tests/EditorFileUsageTest.php @@ -49,6 +49,7 @@ public function setUp() { // Create a node type for testing. $type = entity_create('node_type', array('type' => 'page', 'name' => 'page')); $type->save(); + node_add_body_field($type); } /** diff --git a/core/modules/entity/src/Tests/EntityDisplayTest.php b/core/modules/entity/src/Tests/EntityDisplayTest.php index 1efa671..ea224ab 100644 --- a/core/modules/entity/src/Tests/EntityDisplayTest.php +++ b/core/modules/entity/src/Tests/EntityDisplayTest.php @@ -265,12 +265,13 @@ public function testRenameDeleteBundle() { $this->installEntitySchema('node'); // Create a node bundle, display and form display object. - entity_create('node_type', array('type' => 'article'))->save(); + $type = entity_create('node_type', array('type' => 'article')); + $type->save(); + node_add_body_field($type); entity_get_display('node', 'article', 'default')->save(); entity_get_form_display('node', 'article', 'default')->save(); // Rename the article bundle and assert the entity display is renamed. - $type = node_type_load('article'); $type->old_type = 'article'; $type->type = 'article_rename'; $type->save(); diff --git a/core/modules/node/src/Tests/NodeTypeRenameConfigImportTest.php b/core/modules/node/src/Tests/NodeTypeRenameConfigImportTest.php index ca6e476..864cb18 100644 --- a/core/modules/node/src/Tests/NodeTypeRenameConfigImportTest.php +++ b/core/modules/node/src/Tests/NodeTypeRenameConfigImportTest.php @@ -39,11 +39,10 @@ public function setUp() { * Tests configuration renaming. */ public function testConfigurationRename() { - $content_type = entity_create('node_type', array( + $content_type = $this->drupalCreateContentType(array( 'type' => Unicode::strtolower($this->randomMachineName(16)), 'name' => $this->randomMachineName(), )); - $content_type->save(); $staged_type = $content_type->type; $active = $this->container->get('config.storage'); $staging = $this->container->get('config.storage.staging'); diff --git a/core/profiles/standard/config/install/entity.form_display.node.page.default.yml b/core/profiles/standard/config/install/entity.form_display.node.page.default.yml new file mode 100644 index 0000000..0b19637 --- /dev/null +++ b/core/profiles/standard/config/install/entity.form_display.node.page.default.yml @@ -0,0 +1,35 @@ +langcode: en +status: true +dependencies: + entity: + - field.instance.node.page.body + - node.type.page + module: + - path + - text +id: node.page.default +targetEntityType: node +bundle: page +mode: default +content: + title: + type: string + weight: -5 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + path: + type: path + weight: 30 + settings: { } + third_party_settings: { } + body: + type: text_textarea_with_summary + weight: 31 + settings: + rows: 9 + summary_rows: 3 + placeholder: '' + third_party_settings: { } +hidden: { } diff --git a/core/profiles/standard/config/install/entity.view_display.node.page.default.yml b/core/profiles/standard/config/install/entity.view_display.node.page.default.yml new file mode 100644 index 0000000..467a458 --- /dev/null +++ b/core/profiles/standard/config/install/entity.view_display.node.page.default.yml @@ -0,0 +1,22 @@ +langcode: en +status: true +dependencies: + entity: + - field.instance.node.page.body + - node.type.page + module: + - text +id: node.page.default +label: null +targetEntityType: node +bundle: page +mode: default +content: + body: + label: hidden + type: text_default + weight: -4 + settings: { } + third_party_settings: { } +hidden: + langcode: true diff --git a/core/profiles/standard/config/install/entity.view_display.node.page.teaser.yml b/core/profiles/standard/config/install/entity.view_display.node.page.teaser.yml new file mode 100644 index 0000000..3955067 --- /dev/null +++ b/core/profiles/standard/config/install/entity.view_display.node.page.teaser.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + entity: + - entity.view_mode.node.teaser + - field.instance.node.page.body + - node.type.page + module: + - text +id: node.page.teaser +label: null +targetEntityType: node +bundle: page +mode: teaser +content: + body: + label: hidden + type: text_summary_or_trimmed + weight: -4 + settings: + trim_length: 600 + third_party_settings: { } +hidden: + langcode: true