X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Fcore%2Fmodules%2Fcontent_moderation%2Ftests%2Fsrc%2FKernel%2FStateFormatterTest.php;fp=web%2Fcore%2Fmodules%2Fcontent_moderation%2Ftests%2Fsrc%2FKernel%2FStateFormatterTest.php;h=6d2b8b6b5774366faa3ff93ee6bb58aa6304f375;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=c32123df927c9f028efef0a994f0398ac740b634;hpb=74df008bdbb3a11eeea356744f39b802369bda3c;p=yaffs-website diff --git a/web/core/modules/content_moderation/tests/src/Kernel/StateFormatterTest.php b/web/core/modules/content_moderation/tests/src/Kernel/StateFormatterTest.php index c32123df9..6d2b8b6b5 100644 --- a/web/core/modules/content_moderation/tests/src/Kernel/StateFormatterTest.php +++ b/web/core/modules/content_moderation/tests/src/Kernel/StateFormatterTest.php @@ -5,7 +5,7 @@ namespace Drupal\Tests\content_moderation\Kernel; use Drupal\Core\Render\RenderContext; use Drupal\entity_test\Entity\EntityTestRev; use Drupal\KernelTests\KernelTestBase; -use Drupal\workflows\Entity\Workflow; +use Drupal\Tests\content_moderation\Traits\ContentModerationTestTrait; /** * Test the state field formatter. @@ -14,6 +14,8 @@ use Drupal\workflows\Entity\Workflow; */ class StateFormatterTest extends KernelTestBase { + use ContentModerationTestTrait; + /** * Modules to enable. * @@ -36,7 +38,7 @@ class StateFormatterTest extends KernelTestBase { $this->installEntitySchema('content_moderation_state'); $this->installConfig('content_moderation'); - $workflow = Workflow::load('editorial'); + $workflow = $this->createEditorialWorkflow(); $workflow->getTypePlugin()->addEntityTypeAndBundle('entity_test_rev', 'entity_test_rev'); $workflow->save(); }