mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-23 16:13:50 +00:00
Suffix message class with 'Message' and add check on workflow to assert no transitions were applied since message placed in queue
This commit is contained in:
@@ -16,6 +16,7 @@ use Chill\MainBundle\Entity\Workflow\EntityWorkflowStep;
|
||||
use Chill\MainBundle\Repository\Workflow\EntityWorkflowRepository;
|
||||
use Chill\MainBundle\Service\Workflow\CancelStaleWorkflow;
|
||||
use Chill\MainBundle\Service\Workflow\CancelStaleWorkflowHandler;
|
||||
use Chill\MainBundle\Service\Workflow\CancelStaleWorkflowMessage;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
@@ -51,7 +52,7 @@ class CancelStaleWorkflowHandlerTest extends TestCase
|
||||
|
||||
$handler = new CancelStaleWorkflowHandler($workflowRepository, $registry, $em, $logger);
|
||||
|
||||
$handler(new CancelStaleWorkflow(1));
|
||||
$handler(new CancelStaleWorkflowMessage(1));
|
||||
}
|
||||
|
||||
public function testInvokeWorkflowWithMultipleStepsAndValidTransition(): void
|
||||
@@ -92,7 +93,7 @@ class CancelStaleWorkflowHandlerTest extends TestCase
|
||||
|
||||
$handler = new CancelStaleWorkflowHandler($workflowRepository, $registry, $em, $logger);
|
||||
|
||||
$handler(new CancelStaleWorkflow(1));
|
||||
$handler(new CancelStaleWorkflowMessage(1));
|
||||
}
|
||||
|
||||
public function testInvokeWorkflowWithMultipleStepsAndNoValidTransition(): void
|
||||
@@ -134,6 +135,6 @@ class CancelStaleWorkflowHandlerTest extends TestCase
|
||||
|
||||
$handler = new CancelStaleWorkflowHandler($workflowRepository, $registry, $em, $logger);
|
||||
|
||||
$handler(new CancelStaleWorkflow(1));
|
||||
$handler(new CancelStaleWorkflowMessage(1));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user