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 / DefaultRevisionStateTest.php
index 84bade45781765d1291d147bbf24376453179217..d24f7b5c802dd1933850735ae64a5f4ffd1ad9f1 100644 (file)
@@ -6,7 +6,7 @@ use Drupal\KernelTests\KernelTestBase;
 use Drupal\language\Entity\ConfigurableLanguage;
 use Drupal\node\Entity\Node;
 use Drupal\node\Entity\NodeType;
-use Drupal\workflows\Entity\Workflow;
+use Drupal\Tests\content_moderation\Traits\ContentModerationTestTrait;
 
 /**
  * Tests the correct default revision is set.
@@ -15,6 +15,8 @@ use Drupal\workflows\Entity\Workflow;
  */
 class DefaultRevisionStateTest extends KernelTestBase {
 
+  use ContentModerationTestTrait;
+
   /**
    * {@inheritdoc}
    */
@@ -68,7 +70,7 @@ class DefaultRevisionStateTest extends KernelTestBase {
 
     $this->container->get('content_translation.manager')->setEnabled('node', 'example', TRUE);
 
-    $workflow = Workflow::load('editorial');
+    $workflow = $this->createEditorialWorkflow();
     $workflow->getTypePlugin()->addEntityTypeAndBundle('node', 'example');
     $workflow->save();