X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fcontent_moderation%2Ftests%2Fsrc%2FKernel%2FInitialStateTest.php;fp=web%2Fcore%2Fmodules%2Fcontent_moderation%2Ftests%2Fsrc%2FKernel%2FInitialStateTest.php;h=1190aa0436bc24025678cb17a55ec4b36ba36996;hp=3db6a662ce266724314b47d38c6b04ab76ac8544;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/web/core/modules/content_moderation/tests/src/Kernel/InitialStateTest.php b/web/core/modules/content_moderation/tests/src/Kernel/InitialStateTest.php index 3db6a662c..1190aa043 100644 --- a/web/core/modules/content_moderation/tests/src/Kernel/InitialStateTest.php +++ b/web/core/modules/content_moderation/tests/src/Kernel/InitialStateTest.php @@ -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();