Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / content_moderation / tests / src / Kernel / ViewsDataIntegrationTest.php
index 00e107295aad917fcf7ebaf8da514c000e0e17a9..0f89125bb6a0236a1dd4feedf7703ed3c89db992 100644 (file)
@@ -4,9 +4,9 @@ namespace Drupal\Tests\content_moderation\Kernel;
 
 use Drupal\node\Entity\Node;
 use Drupal\node\Entity\NodeType;
+use Drupal\Tests\content_moderation\Traits\ContentModerationTestTrait;
 use Drupal\Tests\views\Kernel\ViewsKernelTestBase;
 use Drupal\views\Views;
-use Drupal\workflows\Entity\Workflow;
 
 /**
  * Tests the views integration of content_moderation.
@@ -15,6 +15,8 @@ use Drupal\workflows\Entity\Workflow;
  */
 class ViewsDataIntegrationTest extends ViewsKernelTestBase {
 
+  use ContentModerationTestTrait;
+
   /**
    * {@inheritdoc}
    */
@@ -44,7 +46,7 @@ class ViewsDataIntegrationTest extends ViewsKernelTestBase {
       'type' => 'page',
     ]);
     $node_type->save();
-    $workflow = Workflow::load('editorial');
+    $workflow = $this->createEditorialWorkflow();
     $workflow->getTypePlugin()->addEntityTypeAndBundle('node', 'page');
     $workflow->getTypePlugin()->addEntityTypeAndBundle('entity_test_mulrevpub', 'entity_test_mulrevpub');
     $workflow->save();