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 / InitialStateTest.php
index 3db6a662ce266724314b47d38c6b04ab76ac8544..1190aa0436bc24025678cb17a55ec4b36ba36996 100644 (file)
@@ -6,7 +6,7 @@ use Drupal\entity_test\Entity\EntityTestRev;
 use Drupal\KernelTests\KernelTestBase;
 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 initial states are set on install.
@@ -15,6 +15,8 @@ use Drupal\workflows\Entity\Workflow;
  */
 class InitialStateTest extends KernelTestBase {
 
+  use ContentModerationTestTrait;
+
   /**
    * {@inheritdoc}
    */
@@ -66,7 +68,7 @@ class InitialStateTest extends KernelTestBase {
     $entity_test->save();
 
     \Drupal::service('module_installer')->install(['content_moderation'], TRUE);
-    $workflow = Workflow::load('editorial');
+    $workflow = $this->createEditorialWorkflow();
     $workflow->getTypePlugin()->addEntityTypeAndBundle('node', 'example');
     $workflow->getTypePlugin()->addEntityTypeAndBundle('entity_test_rev', 'entity_test_rev');
     $workflow->save();