6 Commits

Author SHA1 Message Date
2fb46c65c2
Refactor CancelStaleWorkflowCronJobTest to simplify setup
Replaced KernelTestCase with TestCase to simplify test setup and removed dependency on the database connection. Added NullLogger to replace mocked LoggerInterface during testing. Updated method call in tests to correctly reference CancelStaleWorkflowMessage class.
2024-09-09 15:16:10 +02:00
f4356ac249
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
2024-09-09 15:08:39 +02:00
d152efe084
Refactor imports and remove redundant type strings
This commit refactors the usage of \DateTimeImmutable to ensure consistent namespacing and removes unnecessary string type declarations from constants in CancelStaleWorkflowCronJob. These changes improve code readability and maintainability.
2024-09-09 14:58:19 +02:00
cb446edd18
Suffix message class with 'Message' and add check on workflow to assert no transitions were applied since message placed in queue 2024-09-09 10:40:42 +02:00
5d84e997c1
Php cs fixes 2024-09-09 10:40:42 +02:00
dab68fb409
Add CancelStaleWorkflowCronJobTest 2024-09-09 10:40:41 +02:00