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 / ModeratedContentViewTest.php
index 7891b60f58755166441afc9b3169765ecd65b150..986fe125db740335c205098573ddef2063c46a32 100644 (file)
@@ -3,7 +3,7 @@
 namespace Drupal\Tests\content_moderation\Functional;
 
 use Drupal\Tests\BrowserTestBase;
-use Drupal\workflows\Entity\Workflow;
+use Drupal\Tests\content_moderation\Traits\ContentModerationTestTrait;
 
 /**
  * Tests moderated content administration page functionality.
@@ -12,6 +12,8 @@ use Drupal\workflows\Entity\Workflow;
  */
 class ModeratedContentViewTest extends BrowserTestBase {
 
+  use ContentModerationTestTrait;
+
   /**
    * A user with permission to bypass access content.
    *
@@ -34,7 +36,7 @@ class ModeratedContentViewTest extends BrowserTestBase {
     $this->drupalCreateContentType(['type' => 'article', 'name' => 'Article'])->save();
     $this->drupalCreateContentType(['type' => 'unmoderated_type', 'name' => 'Unmoderated type'])->save();
 
-    $workflow = Workflow::load('editorial');
+    $workflow = $this->createEditorialWorkflow();
     $workflow->getTypePlugin()->addEntityTypeAndBundle('node', 'page');
     $workflow->getTypePlugin()->addEntityTypeAndBundle('node', 'article');
     $workflow->save();