mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-22 15:43:51 +00:00
Render for generic doc
This commit is contained in:
@@ -15,7 +15,7 @@ use Chill\DocStoreBundle\GenericDoc\FetchQuery;
|
||||
use Chill\DocStoreBundle\GenericDoc\FetchQueryInterface;
|
||||
use Chill\DocStoreBundle\GenericDoc\GenericDocDTO;
|
||||
use Chill\DocStoreBundle\GenericDoc\Manager;
|
||||
use Chill\DocStoreBundle\GenericDoc\ProviderForAccompanyingPeriodInterface;
|
||||
use Chill\DocStoreBundle\GenericDoc\GenericDocForAccompanyingPeriodProviderInterface;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Doctrine\DBAL\Connection;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
@@ -52,7 +52,7 @@ class ManagerTest extends KernelTestCase
|
||||
}
|
||||
|
||||
$manager = new Manager(
|
||||
[new SimpleProvider()],
|
||||
[new SimpleGenericDocProvider()],
|
||||
$this->connection,
|
||||
);
|
||||
|
||||
@@ -72,7 +72,7 @@ class ManagerTest extends KernelTestCase
|
||||
}
|
||||
|
||||
$manager = new Manager(
|
||||
[new SimpleProvider()],
|
||||
[new SimpleGenericDocProvider()],
|
||||
$this->connection,
|
||||
);
|
||||
|
||||
@@ -82,7 +82,7 @@ class ManagerTest extends KernelTestCase
|
||||
}
|
||||
}
|
||||
|
||||
final readonly class SimpleProvider implements ProviderForAccompanyingPeriodInterface
|
||||
final readonly class SimpleGenericDocProvider implements GenericDocForAccompanyingPeriodProviderInterface
|
||||
{
|
||||
public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface
|
||||
{
|
||||
|
@@ -12,7 +12,7 @@ declare(strict_types=1);
|
||||
namespace Chill\DocStoreBundle\Tests\GenericDoc\Providers;
|
||||
|
||||
use Chill\DocStoreBundle\GenericDoc\FetchQueryToSqlBuilder;
|
||||
use Chill\DocStoreBundle\GenericDoc\Providers\AccompanyingCourseDocumentProvider;
|
||||
use Chill\DocStoreBundle\GenericDoc\Providers\AccompanyingProviderCourseDocumentGenericDoc;
|
||||
use Chill\DocStoreBundle\Security\Authorization\AccompanyingCourseDocumentVoter;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
@@ -54,7 +54,7 @@ class AccompanyingCourseDocumentProviderTest extends KernelTestCase
|
||||
$security->isGranted(AccompanyingCourseDocumentVoter::SEE, $period)
|
||||
->willReturn(true);
|
||||
|
||||
$provider = new AccompanyingCourseDocumentProvider(
|
||||
$provider = new AccompanyingProviderCourseDocumentGenericDoc(
|
||||
$security->reveal(),
|
||||
$this->entityManager
|
||||
);
|
||||
|
Reference in New Issue
Block a user