X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fcontent_moderation%2Ftests%2Fsrc%2FFunctional%2FModeratedContentViewTest.php;h=986fe125db740335c205098573ddef2063c46a32;hp=7891b60f58755166441afc9b3169765ecd65b150;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/web/core/modules/content_moderation/tests/src/Functional/ModeratedContentViewTest.php b/web/core/modules/content_moderation/tests/src/Functional/ModeratedContentViewTest.php index 7891b60f5..986fe125d 100644 --- a/web/core/modules/content_moderation/tests/src/Functional/ModeratedContentViewTest.php +++ b/web/core/modules/content_moderation/tests/src/Functional/ModeratedContentViewTest.php @@ -3,7 +3,7 @@ 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. @@ -12,6 +12,8 @@ use Drupal\workflows\Entity\Workflow; */ class ModeratedContentViewTest extends BrowserTestBase { + use ContentModerationTestTrait; + /** * A user with permission to bypass access content. * @@ -34,7 +36,7 @@ class ModeratedContentViewTest extends BrowserTestBase { $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();