do not allow to sign if the signature is already applyied

This commit is contained in:
2024-09-13 16:16:42 +02:00
parent f0e8df38af
commit 8e984f2006
3 changed files with 25 additions and 1 deletions

View File

@@ -23,6 +23,7 @@ use Chill\MainBundle\Workflow\WorkflowTransitionContextDTO;
use Chill\PersonBundle\Entity\Person;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
use Twig\Environment;
@@ -62,7 +63,9 @@ class WorkflowAddSignatureControllerTest extends TestCase
$twig->method('render')->with('@ChillMain/Workflow/_signature_sign.html.twig', $this->isType('array'))
->willReturn('ok');
$controller = new WorkflowAddSignatureController($entityWorkflowManager, $pdfSignatureZoneAvailable, $normalizer, $twig);
$urlGenerator = $this->createMock(UrlGeneratorInterface::class);
$controller = new WorkflowAddSignatureController($entityWorkflowManager, $pdfSignatureZoneAvailable, $normalizer, $twig, $urlGenerator);
$actual = $controller($signature, new Request());