Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / path / tests / src / Functional / PathContentModerationTest.php
index 87f117b9aac6bcfb3dc7ca7273b258dc7717dca5..953f1116bafdf208afc85a9c9eef46d5b4c6b703 100644 (file)
@@ -4,7 +4,7 @@ namespace Drupal\Tests\path\Functional;
 
 use Drupal\node\Entity\NodeType;
 use Drupal\Tests\BrowserTestBase;
-use Drupal\workflows\Entity\Workflow;
+use Drupal\Tests\content_moderation\Traits\ContentModerationTestTrait;
 
 /**
  * Tests path aliases with Content Moderation.
@@ -14,6 +14,8 @@ use Drupal\workflows\Entity\Workflow;
  */
 class PathContentModerationTest extends BrowserTestBase {
 
+  use ContentModerationTestTrait;
+
   /**
    * Modules to install.
    *
@@ -32,7 +34,7 @@ class PathContentModerationTest extends BrowserTestBase {
     $node_type->save();
 
     // Set the content type as moderated.
-    $workflow = Workflow::load('editorial');
+    $workflow = $this->createEditorialWorkflow();
     $workflow->getTypePlugin()->addEntityTypeAndBundle('node', 'moderated');
     $workflow->save();