mirror of
				https://gitlab.com/Chill-Projet/chill-bundles.git
				synced 2025-10-31 17:28:23 +00:00 
			
		
		
		
	fix url for granting access to workflow by key
This commit is contained in:
		| @@ -4,6 +4,6 @@ Un suivi "{{ workflow.text }}" a atteint une nouvelle étape: {{ place.text }} | ||||
|  | ||||
| Vous pouvez visualiser le workflow sur cette page: | ||||
|  | ||||
| {{ absolute_url(path('chill_main_workflow_grant_access_by_key', {'id': entity_workflow.id, '_locale': 'fr', 'accessKey': entity_workflow.currentStep.accessKey})) }} | ||||
| {{ absolute_url(path('chill_main_workflow_grant_access_by_key', {'id': entity_workflow.currentStep.id, '_locale': 'fr', 'accessKey': entity_workflow.currentStep.accessKey})) }} | ||||
|  | ||||
| Cordialement, | ||||
|   | ||||
| @@ -18,6 +18,7 @@ use Chill\MainBundle\Workflow\EntityWorkflowMarkingStore; | ||||
| use Chill\MainBundle\Workflow\EventSubscriber\NotificationToUserGroupsOnTransition; | ||||
| use Chill\MainBundle\Workflow\Helper\MetadataExtractor; | ||||
| use Chill\MainBundle\Workflow\WorkflowTransitionContextDTO; | ||||
| use Doctrine\ORM\EntityManagerInterface; | ||||
| use Prophecy\Argument; | ||||
| use Prophecy\PhpUnit\ProphecyTrait; | ||||
| use Symfony\Bridge\Twig\Mime\TemplatedEmail; | ||||
| @@ -45,12 +46,14 @@ class NotificationToUserGroupsOnTransitionTest extends KernelTestCase | ||||
|     use ProphecyTrait; | ||||
|     private Environment $twig; | ||||
|     private BodyRendererInterface $bodyRenderer; | ||||
|     private EntityManagerInterface $em; | ||||
|  | ||||
|     protected function setUp(): void | ||||
|     { | ||||
|         self::bootKernel(); | ||||
|         $this->twig = self::getContainer()->get('twig'); | ||||
|         $this->bodyRenderer = self::getContainer()->get(BodyRendererInterface::class); | ||||
|         $this->em = self::getContainer()->get('doctrine.orm.entity_manager'); | ||||
|     } | ||||
|  | ||||
|     public function testOnCompletedSendNotificationToUserGroupWithEmailAddress(): void | ||||
| @@ -66,7 +69,11 @@ class NotificationToUserGroupsOnTransitionTest extends KernelTestCase | ||||
|         $ug->setEmail('test@email.com')->setLabel(['fr' => 'test group']); | ||||
|  | ||||
|         $mailer = $this->prophesize(MailerInterface::class); | ||||
|         $sendMethod = $mailer->send(Argument::that(function (RawMessage $message): bool { | ||||
|         $sendMethod = $mailer->send(Argument::that(function (RawMessage $message) use ($entityWorkflow): bool { | ||||
|             // we need to set an id to the current step of the entity workflow | ||||
|             $this->em->persist($entityWorkflow); | ||||
|             $this->em->persist($entityWorkflow->getCurrentStep()); | ||||
|  | ||||
|             if (!$message instanceof TemplatedEmail) { | ||||
|                 return false; | ||||
|             } | ||||
| @@ -111,7 +118,7 @@ class NotificationToUserGroupsOnTransitionTest extends KernelTestCase | ||||
|         $workflow->apply($entityWorkflow, 'to_one', ['context' => $dto, 'transition' => 'to_one', 'transitionAt' => new \DateTimeImmutable(), 'byUser' => new User()]); | ||||
|     } | ||||
|  | ||||
|     public function buildRegistryWithEventSubscriber(MailerInterface $mailer, MetadataExtractor $metadataExtractor): Registry | ||||
|     private function buildRegistryWithEventSubscriber(MailerInterface $mailer, MetadataExtractor $metadataExtractor): Registry | ||||
|     { | ||||
|         $builder = new DefinitionBuilder(); | ||||
|         $builder | ||||
|   | ||||
		Reference in New Issue
	
	Block a user