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 / NodeAccessTest.php
index 6716ca36100cbe2915fb0bd71f6934daa19fd173..3a2e0a9ed3f6eb84ab038a62ba12989722b248a5 100644 (file)
@@ -4,9 +4,9 @@ namespace Drupal\Tests\content_moderation\Kernel;
 
 use Drupal\KernelTests\KernelTestBase;
 use Drupal\node\Entity\NodeType;
+use Drupal\Tests\content_moderation\Traits\ContentModerationTestTrait;
 use Drupal\Tests\node\Traits\NodeCreationTrait;
 use Drupal\Tests\user\Traits\UserCreationTrait;
-use Drupal\workflows\Entity\Workflow;
 
 /**
  * Tests with node access enabled.
@@ -17,6 +17,7 @@ class NodeAccessTest extends KernelTestBase {
 
   use NodeCreationTrait;
   use UserCreationTrait;
+  use ContentModerationTestTrait;
 
   /**
    * The moderation information service.
@@ -58,7 +59,7 @@ class NodeAccessTest extends KernelTestBase {
       'label' => 'Page',
     ]);
     $node_type->save();
-    $workflow = Workflow::load('editorial');
+    $workflow = $this->createEditorialWorkflow();
     $workflow->getTypePlugin()->addEntityTypeAndBundle('node', 'page');
     $workflow->save();