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 / ModerationRevisionRevertTest.php
index 479e9dff6b9c51d17c494bfc1eb57d9320f10b1a..b1ad72045a0c057c1b6144eb4c032448262350f3 100644 (file)
@@ -4,7 +4,7 @@ namespace Drupal\Tests\content_moderation\Functional;
 
 use Drupal\simpletest\ContentTypeCreationTrait;
 use Drupal\Tests\BrowserTestBase;
-use Drupal\workflows\Entity\Workflow;
+use Drupal\Tests\content_moderation\Traits\ContentModerationTestTrait;
 
 /**
  * Test revision revert.
@@ -14,6 +14,7 @@ use Drupal\workflows\Entity\Workflow;
 class ModerationRevisionRevertTest extends BrowserTestBase {
 
   use ContentTypeCreationTrait;
+  use ContentModerationTestTrait;
 
   /**
    * Modules to enable.
@@ -34,7 +35,7 @@ class ModerationRevisionRevertTest extends BrowserTestBase {
     $moderated_bundle = $this->createContentType(['type' => 'moderated_bundle']);
     $moderated_bundle->save();
 
-    $workflow = Workflow::load('editorial');
+    $workflow = $this->createEditorialWorkflow();
     $workflow->getTypePlugin()->addEntityTypeAndBundle('node', 'moderated_bundle');
     $workflow->save();