diff --git a/core/modules/comment/src/Tests/CommentAdminTest.php b/core/modules/comment/src/Tests/CommentAdminTest.php index ee434f7bea17e0d0f36001d706e12443625884fd..37ed92ce9d0dfdfefc8cfa74c3f03c92ef6055e9 100644 --- a/core/modules/comment/src/Tests/CommentAdminTest.php +++ b/core/modules/comment/src/Tests/CommentAdminTest.php @@ -8,6 +8,7 @@ namespace Drupal\comment\Tests; use Drupal\user\RoleInterface; +use Drupal\comment\Entity\Comment; /** * Tests comment approval functionality. @@ -50,7 +51,7 @@ function testApprovalAdminInterface() { // Get unapproved comment id. $this->drupalLogin($this->adminUser); $anonymous_comment4 = $this->getUnapprovedComment($subject); - $anonymous_comment4 = entity_create('comment', array( + $anonymous_comment4 = Comment::create(array( 'cid' => $anonymous_comment4, 'subject' => $subject, 'comment_body' => $body, @@ -127,7 +128,7 @@ function testApprovalNodeInterface() { // Get unapproved comment id. $this->drupalLogin($this->adminUser); $anonymous_comment4 = $this->getUnapprovedComment($subject); - $anonymous_comment4 = entity_create('comment', array( + $anonymous_comment4 = Comment::create(array( 'cid' => $anonymous_comment4, 'subject' => $subject, 'comment_body' => $body, diff --git a/core/modules/comment/src/Tests/CommentBookTest.php b/core/modules/comment/src/Tests/CommentBookTest.php index ecc26246680d77f2714d52069030acd58282a39d..24581be569e3e7e478e8e42793609920e5818001 100644 --- a/core/modules/comment/src/Tests/CommentBookTest.php +++ b/core/modules/comment/src/Tests/CommentBookTest.php @@ -9,6 +9,7 @@ use Drupal\comment\CommentInterface; use Drupal\simpletest\WebTestBase; +use Drupal\comment\Entity\Comment; /** * Tests visibility of comments on book pages. @@ -47,7 +48,7 @@ public function testBookCommentPrint() { $comment_subject = $this->randomMachineName(8); $comment_body = $this->randomMachineName(8); - $comment = entity_create('comment', array( + $comment = Comment::create(array( 'subject' => $comment_subject, 'comment_body' => $comment_body, 'entity_id' => $book_node->id(), diff --git a/core/modules/comment/src/Tests/CommentCSSTest.php b/core/modules/comment/src/Tests/CommentCSSTest.php index 47a31cc50cc5d70f2e14e4dc682bcc718c78a6f5..793762b41ff5a577fde091b554b5943f98bf12d3 100644 --- a/core/modules/comment/src/Tests/CommentCSSTest.php +++ b/core/modules/comment/src/Tests/CommentCSSTest.php @@ -10,6 +10,7 @@ use Drupal\Core\Language\LanguageInterface; use Drupal\comment\CommentInterface; use Drupal\user\RoleInterface; +use Drupal\comment\Entity\Comment; /** * Tests CSS classes on comments. @@ -47,7 +48,7 @@ function testCommentClasses() { // Add a comment. /** @var \Drupal\comment\CommentInterface $comment */ - $comment = entity_create('comment', array( + $comment = Comment::create(array( 'entity_id' => $node->id(), 'entity_type' => 'node', 'field_name' => 'comment', diff --git a/core/modules/comment/src/Tests/CommentCacheTagsTest.php b/core/modules/comment/src/Tests/CommentCacheTagsTest.php index 15142d8b682c62dfbc3d53970753dca3f3239e4a..597e7ac31a9323976ab54ce11377f3bfc29c5d55 100644 --- a/core/modules/comment/src/Tests/CommentCacheTagsTest.php +++ b/core/modules/comment/src/Tests/CommentCacheTagsTest.php @@ -77,7 +77,7 @@ protected function createEntity() { $this->entityTestCamelid->save(); // Create a "Llama" comment. - $comment = entity_create('comment', array( + $comment = Comment::create(array( 'subject' => 'Llama', 'comment_body' => array( 'value' => 'The name "llama" was adopted by European settlers from native Peruvians.', diff --git a/core/modules/comment/src/Tests/CommentDefaultFormatterCacheTagsTest.php b/core/modules/comment/src/Tests/CommentDefaultFormatterCacheTagsTest.php index 1164ba0446e838fd8cff7cde3d1e5169fd0121d0..9dbba851e906e76ce908a883a77f542f919e0022 100644 --- a/core/modules/comment/src/Tests/CommentDefaultFormatterCacheTagsTest.php +++ b/core/modules/comment/src/Tests/CommentDefaultFormatterCacheTagsTest.php @@ -13,6 +13,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\HttpFoundation\Session\Session; +use Drupal\comment\Entity\Comment; /** * Tests the bubbling up of comment cache tags when using the Comment list @@ -98,7 +99,7 @@ public function testCacheTags() { // also exists in the {users} table. $user = $this->createUser(); $user->save(); - $comment = entity_create('comment', array( + $comment = Comment::create(array( 'subject' => 'Llama', 'comment_body' => array( 'value' => 'Llamas are cool!', diff --git a/core/modules/comment/src/Tests/CommentLinksTest.php b/core/modules/comment/src/Tests/CommentLinksTest.php index 68f9f0eb766705577adbf2d07ce8b1e5867abf2b..c21601dc9fcf31d23a5e72c4a675633a3754ae52 100644 --- a/core/modules/comment/src/Tests/CommentLinksTest.php +++ b/core/modules/comment/src/Tests/CommentLinksTest.php @@ -11,6 +11,7 @@ use Drupal\Core\Language\LanguageInterface; use Drupal\comment\CommentInterface; use Drupal\user\RoleInterface; +use Drupal\comment\Entity\Comment; /** * Basic comment links tests to ensure markup present. @@ -59,7 +60,7 @@ public function testCommentLinks() { // Create a comment via CRUD API functionality, since // $this->postComment() relies on actual user permissions. - $comment = entity_create('comment', array( + $comment = Comment::create(array( 'cid' => NULL, 'entity_id' => $this->node->id(), 'entity_type' => 'node', diff --git a/core/modules/comment/src/Tests/CommentNewIndicatorTest.php b/core/modules/comment/src/Tests/CommentNewIndicatorTest.php index 46e2795b0e752f1a697f1a9fa878d868acbbef6f..49c9e9e12fbc40db9f3143d771d88a38219ea9db 100644 --- a/core/modules/comment/src/Tests/CommentNewIndicatorTest.php +++ b/core/modules/comment/src/Tests/CommentNewIndicatorTest.php @@ -11,6 +11,7 @@ use Drupal\Core\Language\LanguageInterface; use Drupal\comment\CommentInterface; use Drupal\Core\Url; +use Drupal\comment\Entity\Comment; /** * Tests the 'new' indicator posted on comments. @@ -85,7 +86,7 @@ public function testCommentNewCommentsIndicator() { // Create a new comment. This helper function may be run with different // comment settings so use $comment->save() to avoid complex setup. /** @var \Drupal\comment\CommentInterface $comment */ - $comment = entity_create('comment', array( + $comment = Comment::create(array( 'cid' => NULL, 'entity_id' => $this->node->id(), 'entity_type' => 'node', diff --git a/core/modules/comment/src/Tests/CommentNonNodeTest.php b/core/modules/comment/src/Tests/CommentNonNodeTest.php index aa069422836468ab52977dd6f524c4724c6cfdca..c217fdc6ad3a7826f3cb502bfa1277e7aad0c6bc 100644 --- a/core/modules/comment/src/Tests/CommentNonNodeTest.php +++ b/core/modules/comment/src/Tests/CommentNonNodeTest.php @@ -54,7 +54,7 @@ protected function setUp() { // Create a bundle for entity_test. entity_test_create_bundle('entity_test', 'Entity Test', 'entity_test'); - entity_create('comment_type', array( + CommentType::create(array( 'id' => 'comment', 'label' => 'Comment settings', 'description' => 'Comment settings', diff --git a/core/modules/comment/src/Tests/Views/CommentFieldFilterTest.php b/core/modules/comment/src/Tests/Views/CommentFieldFilterTest.php index 4fd7d58e09489cf87e16211cfe5c9784f2c24494..03b31ff41cde9f8bb432756e20befcbf9fa4bed3 100644 --- a/core/modules/comment/src/Tests/Views/CommentFieldFilterTest.php +++ b/core/modules/comment/src/Tests/Views/CommentFieldFilterTest.php @@ -8,6 +8,7 @@ namespace Drupal\comment\Tests\Views; use Drupal\language\Entity\ConfigurableLanguage; +use Drupal\comment\Entity\Comment; /** * Tests comment field filters with translations. @@ -61,7 +62,7 @@ function setUp() { 'pid' => '', 'node_type' => '', ); - $this->comment = entity_create('comment', $comment); + $this->comment = Comment::create($comment); // Add field values and translate the comment. $this->comment->subject->value = $this->commentTitles['en']; diff --git a/core/modules/comment/src/Tests/Views/CommentRestExportTest.php b/core/modules/comment/src/Tests/Views/CommentRestExportTest.php index 9737b4fbd02170b1071e2eadcb0ba1487096a4e6..b2f334c3312587bcee1094d717039e1ddf3fef80 100644 --- a/core/modules/comment/src/Tests/Views/CommentRestExportTest.php +++ b/core/modules/comment/src/Tests/Views/CommentRestExportTest.php @@ -8,6 +8,7 @@ namespace Drupal\comment\Tests\Views; use Drupal\Component\Serialization\Json; +use Drupal\comment\Entity\Comment; /** * Tests a comment rest export view. @@ -43,7 +44,7 @@ protected function setUp() { 'name' => 'bobby tables', 'hostname' => 'public.example.com', ); - $this->comment = entity_create('comment', $comment); + $this->comment = Comment::create($comment); $this->comment->save(); $user = $this->drupalCreateUser(['access comments']); diff --git a/core/modules/comment/src/Tests/Views/CommentTestBase.php b/core/modules/comment/src/Tests/Views/CommentTestBase.php index 202bf4727688d22991f1bad81dc99ff0e9ce45dc..2067e2dc610e90e25e9f02250d73ad3556ee2e73 100644 --- a/core/modules/comment/src/Tests/Views/CommentTestBase.php +++ b/core/modules/comment/src/Tests/Views/CommentTestBase.php @@ -10,6 +10,7 @@ use Drupal\comment\Tests\CommentTestTrait; use Drupal\views\Tests\ViewTestBase; use Drupal\views\Tests\ViewTestData; +use Drupal\comment\Entity\Comment; /** * Tests the argument_comment_user_uid handler. @@ -87,7 +88,7 @@ protected function setUp() { 'pid' => '', 'mail' => 'someone@example.com', ); - $this->comment = entity_create('comment', $comment); + $this->comment = Comment::create($comment); $this->comment->save(); } diff --git a/core/modules/comment/src/Tests/Views/DefaultViewRecentCommentsTest.php b/core/modules/comment/src/Tests/Views/DefaultViewRecentCommentsTest.php index 89b03b393c2d46f432092c61d06fa8451aeb8b50..bd52ef3c6394e74a6d2e9339f657af7bc7b3e3a0 100644 --- a/core/modules/comment/src/Tests/Views/DefaultViewRecentCommentsTest.php +++ b/core/modules/comment/src/Tests/Views/DefaultViewRecentCommentsTest.php @@ -84,7 +84,7 @@ protected function setUp() { // Create some comments and attach them to the created node. for ($i = 0; $i < $this->masterDisplayResults; $i++) { /** @var \Drupal\comment\CommentInterface $comment */ - $comment = entity_create('comment', array( + $comment = Comment::create(array( 'status' => CommentInterface::PUBLISHED, 'field_name' => 'comment', 'entity_type' => 'node', diff --git a/core/modules/forum/src/Tests/ForumBlockTest.php b/core/modules/forum/src/Tests/ForumBlockTest.php index f505bdf281c2ac8bcac785627eb15a981ddd16ef..c0003d9051e031a3f76df6ebd122ede5c78b146c 100644 --- a/core/modules/forum/src/Tests/ForumBlockTest.php +++ b/core/modules/forum/src/Tests/ForumBlockTest.php @@ -9,6 +9,7 @@ use Drupal\simpletest\WebTestBase; use Drupal\Core\Datetime\DrupalDateTime; +use Drupal\comment\Entity\Comment; /** * Tests the forum blocks. @@ -97,7 +98,7 @@ public function testActiveForumTopicsBlock() { // Get the node from the topic title. $node = $this->drupalGetNodeByTitle($topics[$index]); $date->modify('+1 minute'); - $comment = entity_create('comment', array( + $comment = Comment::create(array( 'entity_id' => $node->id(), 'field_name' => 'comment_forum', 'entity_type' => 'node', diff --git a/core/modules/forum/src/Tests/ForumUninstallTest.php b/core/modules/forum/src/Tests/ForumUninstallTest.php index 8eb13452f996880af1e2a86d3575585cf16bf8d4..c3f18d00496b9140a34cf323155136a16c9d6c31 100644 --- a/core/modules/forum/src/Tests/ForumUninstallTest.php +++ b/core/modules/forum/src/Tests/ForumUninstallTest.php @@ -11,6 +11,7 @@ use Drupal\field\Entity\FieldStorageConfig; use Drupal\node\Entity\NodeType; use Drupal\simpletest\WebTestBase; +use Drupal\comment\Entity\Comment; /** * Tests forum module uninstallation. @@ -54,7 +55,7 @@ public function testForumUninstallWithField() { )); // Create at least one comment against the forum node. - $comment = entity_create('comment', array( + $comment = Comment::create(array( 'entity_id' => $node->nid->value, 'entity_type' => 'node', 'field_name' => 'comment_forum', diff --git a/core/modules/hal/src/Tests/EntityTest.php b/core/modules/hal/src/Tests/EntityTest.php index 6301fb05a5c88dce57012a0b9633732eb001def1..ef0698b16ac45376b458b3482eefc363c72cf8c8 100644 --- a/core/modules/hal/src/Tests/EntityTest.php +++ b/core/modules/hal/src/Tests/EntityTest.php @@ -8,6 +8,7 @@ namespace Drupal\hal\Tests; use Drupal\comment\Tests\CommentTestTrait; +use Drupal\comment\Entity\Comment; /** * Tests that nodes and terms are correctly normalized and denormalized. @@ -167,7 +168,7 @@ public function testComment() { )); $node->save(); - $parent_comment = entity_create('comment', array( + $parent_comment = Comment::create(array( 'uid' => $account->id(), 'subject' => $this->randomMachineName(), 'comment_body' => [ @@ -180,7 +181,7 @@ public function testComment() { )); $parent_comment->save(); - $comment = entity_create('comment', array( + $comment = Comment::create(array( 'uid' => $account->id(), 'subject' => $this->randomMachineName(), 'comment_body' => [ diff --git a/core/modules/node/src/Tests/NodeAccessPagerTest.php b/core/modules/node/src/Tests/NodeAccessPagerTest.php index c442566255754e02bea5e94fa87582123e0bdc6b..6eb9efff00f8c4354c7b4272169b47323d050e83 100644 --- a/core/modules/node/src/Tests/NodeAccessPagerTest.php +++ b/core/modules/node/src/Tests/NodeAccessPagerTest.php @@ -10,6 +10,7 @@ use Drupal\comment\CommentInterface; use Drupal\comment\Tests\CommentTestTrait; use Drupal\simpletest\WebTestBase; +use Drupal\comment\Entity\Comment; /** * Tests access controlled node views have the right amount of comment pages. @@ -45,7 +46,7 @@ public function testCommentPager() { // Create 60 comments. for ($i = 0; $i < 60; $i++) { - $comment = entity_create('comment', array( + $comment = Comment::create(array( 'entity_id' => $node->id(), 'entity_type' => 'node', 'field_name' => 'comment', diff --git a/core/modules/rdf/src/Tests/CommentAttributesTest.php b/core/modules/rdf/src/Tests/CommentAttributesTest.php index 8d3beb756455e2a375e88d8fa25bdc2938754402..552fbafe4e901906063fb0595066f431b12ee8ea 100644 --- a/core/modules/rdf/src/Tests/CommentAttributesTest.php +++ b/core/modules/rdf/src/Tests/CommentAttributesTest.php @@ -11,6 +11,7 @@ use Drupal\comment\CommentManagerInterface; use Drupal\comment\Tests\CommentTestBase; use Drupal\user\RoleInterface; +use Drupal\comment\Entity\Comment; /** * Tests the RDFa markup of comments. @@ -372,7 +373,7 @@ function saveComment($nid, $uid, $contact = NULL, $pid = 0) { $values += $contact; } - $comment = entity_create('comment', $values); + $comment = Comment::create($values); $comment->save(); return $comment; } diff --git a/core/modules/rdf/src/Tests/StandardProfileTest.php b/core/modules/rdf/src/Tests/StandardProfileTest.php index 6ef3b53d3121121f3ec97dfbac518e878c713ad3..c1cd2a5b063e1d3ed48ad822852687acff227a49 100644 --- a/core/modules/rdf/src/Tests/StandardProfileTest.php +++ b/core/modules/rdf/src/Tests/StandardProfileTest.php @@ -12,6 +12,7 @@ use Drupal\node\Entity\NodeType; use Drupal\node\NodeInterface; use Drupal\simpletest\WebTestBase; +use Drupal\comment\Entity\Comment; /** * Tests the RDF mappings and RDFa markup of the standard profile. @@ -515,7 +516,7 @@ protected function saveComment($nid, $uid, $contact = NULL, $pid = 0) { $values += $contact; } - $comment = entity_create('comment', $values); + $comment = Comment::create($values); $comment->save(); return $comment; } diff --git a/core/modules/system/src/Tests/Entity/EntityCrudHookTest.php b/core/modules/system/src/Tests/Entity/EntityCrudHookTest.php index 2885d471b06730f07f209aad376c511e55126d0a..4b04e6b831b6c41f4a8210376e7fdb00cc9d07ab 100644 --- a/core/modules/system/src/Tests/Entity/EntityCrudHookTest.php +++ b/core/modules/system/src/Tests/Entity/EntityCrudHookTest.php @@ -163,7 +163,7 @@ public function testCommentHooks() { $nid = $node->id(); $GLOBALS['entity_crud_hook_test'] = array(); - $comment = entity_create('comment', array( + $comment = Comment::create(array( 'cid' => NULL, 'pid' => 0, 'entity_id' => $nid, diff --git a/core/modules/system/src/Tests/Entity/EntityReferenceSelection/EntityReferenceSelectionAccessTest.php b/core/modules/system/src/Tests/Entity/EntityReferenceSelection/EntityReferenceSelectionAccessTest.php index 46cc9527fc8de837a2eaa566eed6778d31d81029..0cb2fc0a397b9d0b97f2124b1b95cadc9295c6fa 100644 --- a/core/modules/system/src/Tests/Entity/EntityReferenceSelection/EntityReferenceSelectionAccessTest.php +++ b/core/modules/system/src/Tests/Entity/EntityReferenceSelection/EntityReferenceSelectionAccessTest.php @@ -13,6 +13,7 @@ use Drupal\comment\CommentInterface; use Drupal\simpletest\WebTestBase; use Drupal\user\Entity\User; +use Drupal\comment\Entity\Comment; /** * Tests for the base handlers provided by Entity Reference. @@ -413,7 +414,7 @@ public function testCommentHandler() { $comments = array(); $comment_labels = array(); foreach ($comment_values as $key => $values) { - $comment = entity_create('comment', $values); + $comment = Comment::create($values); $comment->save(); $comments[$key] = $comment; $comment_labels[$key] = Html::escape($comment->label()); diff --git a/core/modules/system/src/Tests/Theme/EntityFilteringThemeTest.php b/core/modules/system/src/Tests/Theme/EntityFilteringThemeTest.php index ba366a3297c4afef82475f46a569351ae06efae0..9a658c7fa472743aca2b41ea8b1e74f9f679fff1 100644 --- a/core/modules/system/src/Tests/Theme/EntityFilteringThemeTest.php +++ b/core/modules/system/src/Tests/Theme/EntityFilteringThemeTest.php @@ -12,6 +12,7 @@ use Drupal\comment\CommentInterface; use Drupal\comment\Plugin\Field\FieldType\CommentItemInterface; use Drupal\simpletest\WebTestBase; +use Drupal\comment\Entity\Comment; /** * Tests themed output for each entity type in all available themes to ensure @@ -110,7 +111,7 @@ protected function setUp() { )); // Create a test comment on the test node. - $this->comment = entity_create('comment', array( + $this->comment = Comment::create(array( 'entity_id' => $this->node->id(), 'entity_type' => 'node', 'field_name' => 'comment', diff --git a/core/modules/tracker/src/Tests/Views/TrackerTestBase.php b/core/modules/tracker/src/Tests/Views/TrackerTestBase.php index a8b36e8b8142cce1aaa6d37b020d3dcac51336ef..923fb0c8256ce9e6fb051e493157827758344167 100644 --- a/core/modules/tracker/src/Tests/Views/TrackerTestBase.php +++ b/core/modules/tracker/src/Tests/Views/TrackerTestBase.php @@ -11,6 +11,7 @@ use Drupal\Core\Language\LanguageInterface; use Drupal\views\Tests\ViewTestBase; use Drupal\views\Tests\ViewTestData; +use Drupal\comment\Entity\Comment; /** * Base class for all tracker tests. @@ -60,7 +61,7 @@ protected function setUp() { 'status' => 1, )); - $this->comment = entity_create('comment', array( + $this->comment = Comment::create(array( 'entity_id' => $this->node->id(), 'entity_type' => 'node', 'field_name' => 'comment', diff --git a/core/modules/user/src/Tests/UserCancelTest.php b/core/modules/user/src/Tests/UserCancelTest.php index d3be1af8aa044890659f09332bbd58fcbd2abb65..3da74897929fb1dffdaee44fbf8f8ce0290f1dd0 100644 --- a/core/modules/user/src/Tests/UserCancelTest.php +++ b/core/modules/user/src/Tests/UserCancelTest.php @@ -249,7 +249,7 @@ function testUserBlockUnpublish() { // Add a comment to the page. $comment_subject = $this->randomMachineName(8); $comment_body = $this->randomMachineName(8); - $comment = entity_create('comment', array( + $comment = Comment::create(array( 'subject' => $comment_subject, 'comment_body' => $comment_body, 'entity_id' => $node->id(), @@ -316,7 +316,7 @@ function testUserAnonymize() { // Add a comment to the page. $comment_subject = $this->randomMachineName(8); $comment_body = $this->randomMachineName(8); - $comment = entity_create('comment', array( + $comment = Comment::create(array( 'subject' => $comment_subject, 'comment_body' => $comment_body, 'entity_id' => $node->id(), diff --git a/core/modules/views/src/Tests/DefaultViewsTest.php b/core/modules/views/src/Tests/DefaultViewsTest.php index 197d25e5adf993141bc6953074db78ec4933047b..12983f6cf6fd59cffb9b9f994195a796e8fe7349 100644 --- a/core/modules/views/src/Tests/DefaultViewsTest.php +++ b/core/modules/views/src/Tests/DefaultViewsTest.php @@ -15,6 +15,7 @@ use Drupal\Core\Url; use Drupal\field\Tests\EntityReference\EntityReferenceTestTrait; use Drupal\views\Views; +use Drupal\comment\Entity\Comment; /** * Tests the default views provided by views. @@ -101,7 +102,7 @@ protected function setUp() { 'entity_type' => 'node', 'field_name' => 'comment' ); - entity_create('comment', $comment)->save(); + Comment::create($comment)->save(); } // Some views, such as the "Who's Online" view, only return results if at diff --git a/core/modules/views/src/Tests/Entity/FieldEntityTest.php b/core/modules/views/src/Tests/Entity/FieldEntityTest.php index 925ed10853babda64d31b7e9a189d18a7906b26c..c121157f45431606e3f2ce3251fce7cee8147e5b 100644 --- a/core/modules/views/src/Tests/Entity/FieldEntityTest.php +++ b/core/modules/views/src/Tests/Entity/FieldEntityTest.php @@ -11,6 +11,7 @@ use Drupal\views\Tests\ViewTestBase; use Drupal\views\Tests\ViewTestData; use Drupal\views\Views; +use Drupal\comment\Entity\Comment; /** * Tests the field plugin base integration with the entity system. @@ -59,7 +60,7 @@ public function testGetEntity() { $node = entity_create('node', array('uid' => $account->id(), 'type' => 'page', 'title' => $this->randomString())); $node->save(); - $comment = entity_create('comment', array( + $comment = Comment::create(array( 'uid' => $account->id(), 'entity_id' => $node->id(), 'entity_type' => 'node', diff --git a/core/modules/views/src/Tests/Entity/ViewEntityDependenciesTest.php b/core/modules/views/src/Tests/Entity/ViewEntityDependenciesTest.php index b86aade086a4278b0d9204ce321305394c95cd7c..a46e5092f3628c848db05840f013529438931fb3 100644 --- a/core/modules/views/src/Tests/Entity/ViewEntityDependenciesTest.php +++ b/core/modules/views/src/Tests/Entity/ViewEntityDependenciesTest.php @@ -12,6 +12,7 @@ use Drupal\views\Tests\ViewTestData; use Drupal\views\Tests\ViewKernelTestBase; use Drupal\views\Views; +use Drupal\comment\Entity\CommentType; /** * Tests the calculation of dependencies for views. @@ -44,7 +45,7 @@ protected function setUp() { $this->installEntitySchema('node'); $this->installConfig(array('field', 'node')); - $comment_type = entity_create('comment_type', array( + $comment_type = CommentType::create(array( 'id' => 'comment', 'label' => 'Comment settings', 'description' => 'Comment settings',