mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-05 14:25:00 +00:00
Adjust logic for removing the hold on a workflow only by user who owns the hold and when a transition is applied on the workflow
This commit is contained in:
@@ -30,6 +30,7 @@ class WorkflowOnHoldControllerTest extends KernelTestCase
|
||||
private $workflow;
|
||||
private $currentStep;
|
||||
private $currentUser;
|
||||
private $controller;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
@@ -53,6 +54,13 @@ class WorkflowOnHoldControllerTest extends KernelTestCase
|
||||
$this->registry->method('get')->with($this->entityWorkflow, 'workflow_name')->willReturn($this->workflow);
|
||||
$this->workflow->method('getEnabledTransitions')->with($this->entityWorkflow)->willReturn([]);
|
||||
$this->entityWorkflow->method('getUsersInvolved')->willReturn([]);
|
||||
|
||||
$this->controller = new WorkflowOnHoldController(
|
||||
$this->entityManager,
|
||||
$this->security,
|
||||
$this->registry,
|
||||
$this->entityWorkflowStepHoldRepository
|
||||
);
|
||||
}
|
||||
|
||||
public function testPutOnHoldPersistence(): void
|
||||
@@ -76,13 +84,6 @@ class WorkflowOnHoldControllerTest extends KernelTestCase
|
||||
$this->entityManager->expects($this->once())
|
||||
->method('flush');
|
||||
|
||||
$controller = new WorkflowOnHoldController(
|
||||
$this->entityManager,
|
||||
$this->security,
|
||||
$this->registry,
|
||||
$this->entityWorkflowStepHoldRepository
|
||||
);
|
||||
|
||||
$request = new Request();
|
||||
$controller->putOnHold($this->entityWorkflow, $request);
|
||||
}
|
||||
|
Reference in New Issue
Block a user