Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / content_moderation / tests / src / Functional / ModerationActionsTest.php
index 32d10fa045cba5cf0faa663b59d5ca30ae2d8962..fbe0b3a38b485e5588b2695526a11b0d57254d2c 100644 (file)
@@ -5,7 +5,7 @@ namespace Drupal\Tests\content_moderation\Functional;
 use Drupal\node\Entity\Node;
 use Drupal\simpletest\ContentTypeCreationTrait;
 use Drupal\Tests\BrowserTestBase;
-use Drupal\workflows\Entity\Workflow;
+use Drupal\Tests\content_moderation\Traits\ContentModerationTestTrait;
 
 /**
  * Test the content moderation actions.
@@ -15,6 +15,7 @@ use Drupal\workflows\Entity\Workflow;
 class ModerationActionsTest extends BrowserTestBase {
 
   use ContentTypeCreationTrait;
+  use ContentModerationTestTrait;
 
   /**
    * Modules to enable.
@@ -38,7 +39,7 @@ class ModerationActionsTest extends BrowserTestBase {
     $standard_bundle = $this->createContentType(['type' => 'standard_bundle']);
     $standard_bundle->save();
 
-    $workflow = Workflow::load('editorial');
+    $workflow = $this->createEditorialWorkflow();
     $workflow->getTypePlugin()->addEntityTypeAndBundle('node', 'moderated_bundle');
     $workflow->save();