Render for generic doc

This commit is contained in:
2023-05-24 21:57:20 +02:00
parent 8dbe2d6ec2
commit e550817ded
14 changed files with 299 additions and 66 deletions

View File

@@ -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
{

View File

@@ -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
);