mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 19:13:49 +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:
@@ -13,10 +13,14 @@ namespace Chill\DocStoreBundle\Tests\Workflow;
|
||||
|
||||
use Chill\DocStoreBundle\Entity\AccompanyingCourseDocument;
|
||||
use Chill\DocStoreBundle\Repository\AccompanyingCourseDocumentRepository;
|
||||
use Chill\DocStoreBundle\Workflow\AccompanyingCourseDocumentWorkflowHandler;
|
||||
use Chill\DocStoreBundle\Workflow\WorkflowWithPublicViewDocumentHelper;
|
||||
use Chill\MainBundle\Entity\User;
|
||||
use Chill\MainBundle\Entity\Workflow\EntityWorkflow;
|
||||
use Chill\MainBundle\Repository\Workflow\EntityWorkflowRepository;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Service\AccompanyingPeriod\ProvidePersonsAssociated;
|
||||
use Chill\PersonBundle\Service\AccompanyingPeriod\ProvideThirdPartiesAssociated;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Prophecy\PhpUnit\ProphecyTrait;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
@@ -45,6 +49,8 @@ class AccompanyingCourseDocumentWorkflowHandlerTest extends TestCase
|
||||
$this->prophesize(EntityWorkflowRepository::class)->reveal(),
|
||||
$this->buildRepository($document, 1),
|
||||
new WorkflowWithPublicViewDocumentHelper($this->prophesize(Environment::class)->reveal()),
|
||||
$this->prophesize(ProvideThirdPartiesAssociated::class)->reveal(),
|
||||
$this->prophesize(ProvidePersonsAssociated::class)->reveal(),
|
||||
);
|
||||
|
||||
$users = $handler->getSuggestedUsers($entityWorkflow);
|
||||
@@ -68,6 +74,8 @@ class AccompanyingCourseDocumentWorkflowHandlerTest extends TestCase
|
||||
$this->prophesize(EntityWorkflowRepository::class)->reveal(),
|
||||
$this->buildRepository($document, 1),
|
||||
new WorkflowWithPublicViewDocumentHelper($this->prophesize(Environment::class)->reveal()),
|
||||
$this->prophesize(ProvideThirdPartiesAssociated::class)->reveal(),
|
||||
$this->prophesize(ProvidePersonsAssociated::class)->reveal(),
|
||||
);
|
||||
|
||||
$users = $handler->getSuggestedUsers($entityWorkflow);
|
||||
|
Reference in New Issue
Block a user