protected function assertStorageException(array
$values, bool
$has_exception): void
{ $defaults =
[ 'moderation_state' => 'draft',
'workflow' => 'editorial',
];
$entity = ContentModerationState::
create($values +
$defaults);
$exception_triggered = FALSE;
try { ContentModerationState::
updateOrCreateFromEntity($entity);
} catch (\Exception
$e) { $exception_triggered = TRUE;
} $this->
assertEquals($has_exception,
$exception_triggered);
}}