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.
*/
class ModeratedContentViewTest extends BrowserTestBase {
+ use ContentModerationTestTrait;
+
/**
* A user with permission to bypass access content.
*
$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();