unset($editorial_2_values['uuid'
]);
$editorial_2_values['id'
] = 'editorial_2';
$editorial_2_values['type_settings'
]['states'
]['archived'
]['default_revision'
] = FALSE;
$editorial_2 = Workflow::
create($editorial_2_values);
$this->workspaceManager->
executeOutsideWorkspace(function D
) use ($editorial_2) { $editorial_2->
save();
});
// Create two bundles and assign the two workflows for each of them.
$this->
createContentType(['type' => 'page'
]);
$this->
addEntityTypeAndBundleToWorkflow($editorial, 'node', 'page'
);
$this->
createContentType(['type' => 'article'
]);
$this->
addEntityTypeAndBundleToWorkflow($editorial_2, 'node', 'article'
);
// Create three entities for each bundle, covering all the available
// moderation states.
$page_archived = Node::
create(['type' => 'page', 'title' => 'Test page - archived', 'moderation_state' => 'archived'
]);
$page_archived->
save();
$page_draft = Node::
create(['type' => 'page', 'title' => 'Test page - draft', 'moderation_state' => 'draft'
]);
$page_draft->
save();
$page_published = Node::
create(['type' => 'page', 'title' => 'Test page - published', 'moderation_state' => 'published'
]);
$page_published->
save();