mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-29 01:55:01 +00:00
fix tests
This commit is contained in:
@@ -17,7 +17,6 @@ use Chill\MainBundle\Form\Type\Export\AggregatorType;
|
||||
use Chill\MainBundle\Form\Type\Export\ExportType;
|
||||
use Chill\MainBundle\Form\Type\Export\FilterType;
|
||||
use Chill\MainBundle\Repository\CenterRepositoryInterface;
|
||||
use Chill\MainBundle\Repository\RegroupmentRepository;
|
||||
use Chill\MainBundle\Repository\RegroupmentRepositoryInterface;
|
||||
|
||||
/**
|
||||
|
@@ -16,7 +16,6 @@ use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Doctrine\ORM\NonUniqueResultException;
|
||||
use Doctrine\ORM\NoResultException;
|
||||
use Doctrine\Persistence\ObjectRepository;
|
||||
|
||||
final readonly class RegroupmentRepository implements RegroupmentRepositoryInterface
|
||||
{
|
||||
|
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Chill\MainBundle\Repository;
|
||||
|
||||
use Chill\MainBundle\Entity\Regroupment;
|
||||
|
@@ -152,7 +152,6 @@ abstract class AbstractFilterTest extends KernelTestCase
|
||||
public function testDataNormalization(array $data, int $version, array $customAssert): void
|
||||
{
|
||||
$filter = $this->getFilter();
|
||||
$em = $this->getContainer()->get(EntityManagerInterface::class);
|
||||
|
||||
$normalized = $filter->normalizeFormData($data);
|
||||
$actual = $filter->denormalizeFormData($normalized, $version);
|
||||
|
@@ -18,7 +18,6 @@ use Chill\MainBundle\Export\ExportManager;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Prophecy\Argument;
|
||||
use Prophecy\PhpUnit\ProphecyTrait;
|
||||
use Psr\Log\NullLogger;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
use Symfony\Component\Serializer\SerializerInterface;
|
||||
use Twig\Environment;
|
||||
|
@@ -19,7 +19,6 @@ use Chill\MainBundle\Export\ExportManager;
|
||||
use Chill\MainBundle\Export\FilterInterface;
|
||||
use Chill\MainBundle\Export\FormatterInterface;
|
||||
use Chill\MainBundle\Repository\CenterRepositoryInterface;
|
||||
use Chill\MainBundle\Repository\RegroupmentRepository;
|
||||
use Chill\MainBundle\Repository\RegroupmentRepositoryInterface;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Prophecy\Argument;
|
||||
|
@@ -17,7 +17,6 @@ use Chill\MainBundle\Export\AggregatorInterface;
|
||||
use Chill\MainBundle\Export\ExportInterface;
|
||||
use Chill\MainBundle\Export\ExportManager;
|
||||
use Chill\MainBundle\Export\FilterInterface;
|
||||
use Chill\MainBundle\Form\Type\Export\ExportType;
|
||||
use Chill\MainBundle\Repository\UserRepositoryInterface;
|
||||
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
|
||||
use Chill\MainBundle\Test\PrepareCenterTrait;
|
||||
@@ -30,12 +29,10 @@ use Prophecy\Prophet;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
|
||||
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
|
||||
use Symfony\Component\Security\Core\User\UserInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
/**
|
||||
* Test the export manager.
|
||||
@@ -480,7 +477,7 @@ class DummyExport implements ExportInterface
|
||||
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data, \Chill\MainBundle\Export\ExportGenerationContext $context): QueryBuilder
|
||||
{
|
||||
throw new \RuntimeException("not implemented");
|
||||
throw new \RuntimeException('not implemented');
|
||||
}
|
||||
|
||||
public function requiredRole(): string
|
||||
|
@@ -156,7 +156,7 @@ class SortExportElementTest extends KernelTestCase
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface
|
||||
public function getTitle(): string|TranslatableInterface
|
||||
{
|
||||
return $this->title;
|
||||
}
|
||||
@@ -180,7 +180,7 @@ class SortExportElementTest extends KernelTestCase
|
||||
return new class ($title) implements FilterInterface {
|
||||
public function __construct(private readonly string $title) {}
|
||||
|
||||
public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface
|
||||
public function getTitle(): string|TranslatableInterface
|
||||
{
|
||||
return $this->title;
|
||||
}
|
||||
@@ -207,7 +207,7 @@ class SortExportElementTest extends KernelTestCase
|
||||
return [];
|
||||
}
|
||||
|
||||
public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array
|
||||
public function describeAction($data, $format = 'string'): string|TranslatableInterface|array
|
||||
{
|
||||
return ['a', []];
|
||||
}
|
||||
|
Reference in New Issue
Block a user