mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-02 13:03:50 +00:00
Add suggested persons and third parties methods
Introduced getSuggestedPersons and getSuggestedThirdParties methods across various WorkflowHandlers. These methods integrate with ProvidePersonsAssociated and ProvideThirdPartiesAssociated services to fetch related entities, enhancing the workflow handling capabilities.
This commit is contained in:
@@ -19,6 +19,8 @@ use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluationDocument;
|
||||
use Chill\PersonBundle\Repository\AccompanyingPeriod\AccompanyingPeriodWorkEvaluationDocumentRepository;
|
||||
use Chill\PersonBundle\Service\AccompanyingPeriodWork\ProvidePersonsAssociated;
|
||||
use Chill\PersonBundle\Service\AccompanyingPeriodWork\ProvideThirdPartiesAssociated;
|
||||
use Chill\PersonBundle\Workflow\AccompanyingPeriodWorkEvaluationDocumentWorkflowHandler;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Prophecy\PhpUnit\ProphecyTrait;
|
||||
@@ -59,6 +61,8 @@ class AccompanyingPeriodWorkEvaluationDocumentWorkflowHandlerTest extends TestCa
|
||||
$translatableStringHelperProphecy->reveal(),
|
||||
$translatorProphecy->reveal(),
|
||||
new WorkflowWithPublicViewDocumentHelper($twig->reveal()),
|
||||
$this->prophesize(ProvideThirdPartiesAssociated::class)->reveal(),
|
||||
$this->prophesize(ProvidePersonsAssociated::class)->reveal(),
|
||||
);
|
||||
|
||||
$entityWorkflow->setRelatedEntityId(1);
|
||||
|
@@ -17,6 +17,9 @@ use Chill\MainBundle\Repository\Workflow\EntityWorkflowRepository;
|
||||
use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Repository\AccompanyingPeriod\AccompanyingPeriodWorkEvaluationRepository;
|
||||
use Chill\PersonBundle\Service\AccompanyingPeriodWork\ProvidePersonsAssociated;
|
||||
use Chill\PersonBundle\Service\AccompanyingPeriodWork\ProvideThirdPartiesAssociated;
|
||||
use Chill\PersonBundle\Workflow\AccompanyingPeriodWorkEvaluationWorkflowHandler;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Prophecy\PhpUnit\ProphecyTrait;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
@@ -53,6 +56,8 @@ class AccompanyingPeriodWorkEvaluationWorkflowHandlerTest extends TestCase
|
||||
$workflowRepositoryProphecy->reveal(),
|
||||
$translatableStringHelperProphecy->reveal(),
|
||||
$translatorProphecy->reveal(),
|
||||
$this->prophesize(ProvideThirdPartiesAssociated::class)->reveal(),
|
||||
$this->prophesize(ProvidePersonsAssociated::class)->reveal(),
|
||||
);
|
||||
|
||||
$users = $handler->getSuggestedUsers($entityWorkflow);
|
||||
|
@@ -17,6 +17,9 @@ use Chill\MainBundle\Repository\Workflow\EntityWorkflowRepository;
|
||||
use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Repository\AccompanyingPeriod\AccompanyingPeriodWorkRepository;
|
||||
use Chill\PersonBundle\Service\AccompanyingPeriodWork\ProvidePersonsAssociated;
|
||||
use Chill\PersonBundle\Service\AccompanyingPeriodWork\ProvideThirdPartiesAssociated;
|
||||
use Chill\PersonBundle\Workflow\AccompanyingPeriodWorkWorkflowHandler;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Prophecy\PhpUnit\ProphecyTrait;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
@@ -52,6 +55,8 @@ class AccompanyingPeriodWorkWorkflowHandlerTest extends TestCase
|
||||
$workflowRepositoryProphecy->reveal(),
|
||||
$translatableStringHelperProphecy->reveal(),
|
||||
$translatorProphecy->reveal(),
|
||||
$this->prophesize(ProvideThirdPartiesAssociated::class)->reveal(),
|
||||
$this->prophesize(ProvidePersonsAssociated::class)->reveal(),
|
||||
);
|
||||
|
||||
$users = $handler->getSuggestedUsers($entityWorkflow);
|
||||
|
Reference in New Issue
Block a user