$workflow->
delete();
$this->
assertPluginStates([ 'Editorial' =>
[ 'editorial-draft' => 'Draft',
'editorial-published' => 'Published',
'editorial-archived' => 'Archived',
],
]);
// Deleting a state from a workflow will remove the state from the filter.
$workflow = Workflow::
load('editorial'
);
$workflow->
getTypePlugin()->
deleteState('archived'
);
$workflow->
save();
$this->
assertPluginStates([ 'Editorial' =>
[ 'editorial-draft' => 'Draft',
'editorial-published' => 'Published',
],
]);
} /**
* Assert the plugin states.
*
* @param string[] $states
* The states which should appear in the filter.
*
* @internal
*/