diff --git a/core/modules/entity/lib/Drupal/entity/Tests/EntityDisplayTest.php b/core/modules/entity/lib/Drupal/entity/Tests/EntityDisplayTest.php index ea834d3..ba798db 100644 --- a/core/modules/entity/lib/Drupal/entity/Tests/EntityDisplayTest.php +++ b/core/modules/entity/lib/Drupal/entity/Tests/EntityDisplayTest.php @@ -196,18 +196,19 @@ public function testFieldComponent() { * Tests renaming and deleting a bundle. */ public function testRenameDeleteBundle() { - $this->enableModules(array('field_sql_storage', 'field_test', 'node', 'system')); + $this->enableModules(array('field_sql_storage', 'field_test', 'node', 'system', 'text')); $this->installSchema('system', array('variable')); + $this->installSchema('node', array('node')); // Create a node bundle and display object. - node_type_save((object) array('type' => 'article')); + entity_create('node_type', array('type' => 'article'))->save(); entity_get_display('node', 'article', 'default')->save(); // Rename the article bundle and assert the entity display is renamed. $info = node_type_load('article'); $info->old_type = 'article'; $info->type = 'article_rename'; - node_type_save($info); + $info->save(); $old_display = entity_load('entity_display', 'node.article.default'); $this->assertFalse($old_display); $new_display = entity_load('entity_display', 'node.article_rename.default'); @@ -215,7 +216,7 @@ public function testRenameDeleteBundle() { $this->assertEqual('node.article_rename.default', $new_display->id); // Delete the bundle. - node_type_delete('article_rename'); + entity_delete_multiple('node_type', array('article_rename')); $display = entity_load('entity_display', 'node.article_rename.default'); $this->assertFalse($display); }