protected function WorkspacesContentModerationStateTest::createEntity in Drupal 10
Same name and namespace in other branches
- 8 core/modules/content_moderation/tests/src/Kernel/WorkspacesContentModerationStateTest.php \Drupal\Tests\content_moderation\Kernel\WorkspacesContentModerationStateTest::createEntity()
- 9 core/modules/content_moderation/tests/src/Kernel/WorkspacesContentModerationStateTest.php \Drupal\Tests\content_moderation\Kernel\WorkspacesContentModerationStateTest::createEntity()
File
- core/
modules/ content_moderation/ tests/ src/ Kernel/ WorkspacesContentModerationStateTest.php, line 214
Class
- WorkspacesContentModerationStateTest
- Tests that Workspaces and Content Moderation work together properly.
Namespace
Drupal\Tests\content_moderation\KernelCode
protected function createEntity($entity_type_id, $moderation_state = 'published', $create_workflow = TRUE) {
$entity = $this->workspaceManager
->executeOutsideWorkspace(function () use ($entity_type_id, $moderation_state, $create_workflow) {
return parent::createEntity($entity_type_id, $moderation_state, $create_workflow);
});
return $entity;
}