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.
use NodeCreationTrait;
use UserCreationTrait;
+ use ContentModerationTestTrait;
/**
* The moderation information service.
'label' => 'Page',
]);
$node_type->save();
- $workflow = Workflow::load('editorial');
+ $workflow = $this->createEditorialWorkflow();
$workflow->getTypePlugin()->addEntityTypeAndBundle('node', 'page');
$workflow->save();