mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 02:53:50 +00:00
Add test for detecting stale workflows and enhance handler
Added a new test to check if workflows are stale in EntityWorkflowTest. Enhanced CancelStaleWorkflowHandler to handle stale workflows more accurately, including checking if workflows have transitioned recently. Updated EntityWorkflow entity to cascade remove workflow steps. Refactor tests for handler, to avoid using $kernel during tests
This commit is contained in:
@@ -105,9 +105,7 @@ class CancelStaleWorkflowCronJobTest extends KernelTestCase
|
||||
false => $messageBus->method('dispatch'),
|
||||
};
|
||||
|
||||
$methodDispatch->willReturnCallback(function (CancelStaleWorkflowMessage $message) {
|
||||
return new Envelope($message);
|
||||
});
|
||||
$methodDispatch->willReturnCallback(fn (CancelStaleWorkflowMessage $message) => new Envelope($message));
|
||||
|
||||
return $messageBus;
|
||||
}
|
||||
|
Reference in New Issue
Block a user