mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-11-08 13:18:22 +00:00
apply rector ruleset "symfony constructor injection"
This commit is contained in:
@@ -15,7 +15,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
|
||||
class example extends \Symfony\Bundle\FrameworkBundle\Controller\AbstractController
|
||||
{
|
||||
public function __construct(private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry)
|
||||
public function __construct(private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry, private readonly \Chill\MainBundle\Pagination\PaginatorFactoryInterface $paginatorFactory)
|
||||
{
|
||||
}
|
||||
public function yourAction(): \Symfony\Component\HttpFoundation\Response
|
||||
@@ -27,7 +27,7 @@ class example extends \Symfony\Bundle\FrameworkBundle\Controller\AbstractControl
|
||||
->getSingleScalarResult();
|
||||
|
||||
// get the PaginatorFactory
|
||||
$paginatorFactory = $this->get('chill_main.paginator_factory');
|
||||
$paginatorFactory = $this->paginatorFactory;
|
||||
|
||||
// create a pagination instance. This instance is only valid for
|
||||
// the current route and parameters
|
||||
|
||||
@@ -18,7 +18,7 @@ use Symfony\Component\Security\Core\Role\Role;
|
||||
|
||||
class ConsultationController extends \Symfony\Bundle\FrameworkBundle\Controller\AbstractController
|
||||
{
|
||||
public function __construct(private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry)
|
||||
public function __construct(private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry, private readonly \Chill\PersonBundle\Repository\PersonRepository $personRepository)
|
||||
{
|
||||
}
|
||||
/**
|
||||
@@ -31,7 +31,7 @@ class ConsultationController extends \Symfony\Bundle\FrameworkBundle\Controller\
|
||||
public function listAction($id): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
/** @var \Chill\PersonBundle\Entity\Person $person */
|
||||
$person = $this->get('chill.person.repository.person')
|
||||
$person = $this->personRepository
|
||||
->find($id);
|
||||
|
||||
if (null === $person) {
|
||||
|
||||
@@ -202,7 +202,7 @@ final class ActivityControllerTest extends WebTestCase
|
||||
private function createFakeUser(): \Chill\MainBundle\Entity\User
|
||||
{
|
||||
$container = self::$kernel->getContainer();
|
||||
$em = $container->get('doctrine.orm.entity_manager');
|
||||
$em = $container->get(\Doctrine\ORM\EntityManager::class);
|
||||
|
||||
// get the social PermissionGroup, and remove CHILL_ACTIVITY_*
|
||||
$socialPermissionGroup = $em
|
||||
@@ -244,7 +244,7 @@ final class ActivityControllerTest extends WebTestCase
|
||||
private function getActivitiesForPerson(\Chill\PersonBundle\Entity\Person $person)
|
||||
{
|
||||
$em = self::$kernel->getContainer()
|
||||
->get('doctrine.orm.entity_manager');
|
||||
->get(\Doctrine\ORM\EntityManager::class);
|
||||
|
||||
$activities = $em->getRepository(\Chill\ActivityBundle\Entity\Activity::class)
|
||||
->findBy(['person' => $person]);
|
||||
@@ -273,7 +273,7 @@ final class ActivityControllerTest extends WebTestCase
|
||||
private function getPersonFromFixtures()
|
||||
{
|
||||
$em = self::$kernel->getContainer()
|
||||
->get('doctrine.orm.entity_manager');
|
||||
->get(\Doctrine\ORM\EntityManager::class);
|
||||
|
||||
$person = $em->getRepository(\Chill\PersonBundle\Entity\Person::class)
|
||||
->findOneBy([
|
||||
@@ -296,7 +296,7 @@ final class ActivityControllerTest extends WebTestCase
|
||||
private function getRandomActivityReason(array $excludeIds = [])
|
||||
{
|
||||
$reasons = self::$kernel->getContainer()
|
||||
->get('doctrine.orm.entity_manager')
|
||||
->get(\Doctrine\ORM\EntityManager::class)
|
||||
->getRepository(\Chill\ActivityBundle\Entity\ActivityReason::class)
|
||||
->findAll();
|
||||
|
||||
@@ -315,7 +315,7 @@ final class ActivityControllerTest extends WebTestCase
|
||||
private function getRandomActivityType()
|
||||
{
|
||||
$types = self::$kernel->getContainer()
|
||||
->get('doctrine.orm.entity_manager')
|
||||
->get(\Doctrine\ORM\EntityManager::class)
|
||||
->getRepository(ActivityType::class)
|
||||
->findAll();
|
||||
|
||||
@@ -331,7 +331,7 @@ final class ActivityControllerTest extends WebTestCase
|
||||
private function getRandomScope($username, $centerName)
|
||||
{
|
||||
$user = self::$kernel->getContainer()
|
||||
->get('doctrine.orm.entity_manager')
|
||||
->get(\Doctrine\ORM\EntityManager::class)
|
||||
->getRepository(\Chill\MainBundle\Entity\User::class)
|
||||
->findOneByUsername($username);
|
||||
|
||||
@@ -340,20 +340,20 @@ final class ActivityControllerTest extends WebTestCase
|
||||
}
|
||||
|
||||
$center = self::$kernel->getContainer()
|
||||
->get('doctrine.orm.entity_manager')
|
||||
->get(\Doctrine\ORM\EntityManager::class)
|
||||
->getRepository(\Chill\MainBundle\Entity\Center::class)
|
||||
->findOneByName($centerName);
|
||||
|
||||
// get scope reachable by both role UPDATE and DELETE
|
||||
$reachableScopesUpdate = self::$kernel->getContainer()
|
||||
->get('chill.main.security.authorization.helper')
|
||||
->get(\Chill\MainBundle\Security\Authorization\AuthorizationHelperInterface::class)
|
||||
->getReachableScopes(
|
||||
$user,
|
||||
'CHILL_ACTIVITY_UPDATE',
|
||||
$center
|
||||
);
|
||||
$reachableScopesDelete = self::$kernel->getContainer()
|
||||
->get('chill.main.security.authorization.helper')
|
||||
->get(\Chill\MainBundle\Security\Authorization\AuthorizationHelperInterface::class)
|
||||
->getReachableScopes(
|
||||
$user,
|
||||
'CHILL_ACTIVITY_DELETE',
|
||||
|
||||
@@ -29,7 +29,7 @@ final class BySocialActionAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.activity.export.bysocialaction_aggregator');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\ActivityBundle\Export\Aggregator\ACPAggregators\BySocialActionAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator(): BySocialActionAggregator
|
||||
|
||||
@@ -29,7 +29,7 @@ final class BySocialIssueAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.activity.export.bysocialissue_aggregator');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\ActivityBundle\Export\Aggregator\ACPAggregators\BySocialIssueAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator(): BySocialIssueAggregator
|
||||
|
||||
@@ -41,7 +41,7 @@ final class ActivityTypeAggregatorTest extends AbstractAggregatorTest
|
||||
|
||||
$request->getLocale()->willReturn('fr');
|
||||
|
||||
self::getContainer()->get('request_stack')
|
||||
self::getContainer()->get(\Symfony\Component\HttpFoundation\RequestStack::class)
|
||||
->push($request->reveal());
|
||||
}
|
||||
|
||||
|
||||
@@ -34,14 +34,14 @@ final class ActivityUserAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.activity.export.user_aggregator');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\ActivityBundle\Export\Aggregator\ActivityUserAggregator::class);
|
||||
|
||||
$request = $this->prophesize()
|
||||
->willExtend(\Symfony\Component\HttpFoundation\Request::class);
|
||||
|
||||
$request->getLocale()->willReturn('fr');
|
||||
|
||||
self::getContainer()->get('request_stack')
|
||||
self::getContainer()->get(\Symfony\Component\HttpFoundation\RequestStack::class)
|
||||
->push($request->reveal());
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ final class SumActivityVisitDurationTest extends AbstractExportTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->export = self::getContainer()->get('chill.activity.export.sum_activity_visit_duration_linked_to_acp');
|
||||
$this->export = self::getContainer()->get(\Chill\ActivityBundle\Export\Export\LinkedToACP\SumActivityVisitDuration::class);
|
||||
}
|
||||
|
||||
public function getExport()
|
||||
|
||||
@@ -39,7 +39,7 @@ final class ListActivityTest extends AbstractExportTest
|
||||
|
||||
$request->getLocale()->willReturn('fr');
|
||||
|
||||
self::getContainer()->get('request_stack')
|
||||
self::getContainer()->get(\Symfony\Component\HttpFoundation\RequestStack::class)
|
||||
->push($request->reveal());
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ final class ActivityReasonFilterTest extends AbstractFilterTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->filter = self::getContainer()->get('chill.activity.export.reason_filter');
|
||||
$this->filter = self::getContainer()->get(\Chill\ActivityBundle\Export\Filter\PersonFilters\ActivityReasonFilter::class);
|
||||
|
||||
$request = $this->prophesize()
|
||||
->willExtend(\Symfony\Component\HttpFoundation\Request::class);
|
||||
|
||||
@@ -31,7 +31,7 @@ final class ActivityTypeFilterTest extends AbstractFilterTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->filter = self::getContainer()->get('chill.activity.export.type_filter');
|
||||
$this->filter = self::getContainer()->get(\Chill\ActivityBundle\Export\Filter\ActivityTypeFilter::class);
|
||||
}
|
||||
|
||||
public function getFilter(): ActivityTypeFilter
|
||||
|
||||
@@ -31,7 +31,7 @@ final class ActivityReasonFilterTest extends AbstractFilterTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->filter = self::getContainer()->get('chill.activity.export.reason_filter');
|
||||
$this->filter = self::getContainer()->get(\Chill\ActivityBundle\Export\Filter\PersonFilters\ActivityReasonFilter::class);
|
||||
}
|
||||
|
||||
public function getFilter(): ActivityReasonFilter
|
||||
|
||||
@@ -30,7 +30,7 @@ final class PersonHavingActivityBetweenDateFilterTest extends AbstractFilterTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->filter = self::getContainer()->get('chill.activity.export.person_having_an_activity_between_date_filter');
|
||||
$this->filter = self::getContainer()->get(\Chill\ActivityBundle\Export\Filter\PersonFilters\PersonHavingActivityBetweenDateFilter::class);
|
||||
}
|
||||
|
||||
public function getFilter(): PersonHavingActivityBetweenDateFilter
|
||||
|
||||
@@ -32,7 +32,7 @@ final class PersonHavingActivityBetweenDateFilterTest extends AbstractFilterTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->filter = self::getContainer()->get('chill.activity.export.person_having_an_activity_between_date_filter');
|
||||
$this->filter = self::getContainer()->get(\Chill\ActivityBundle\Export\Filter\PersonFilters\PersonHavingActivityBetweenDateFilter::class);
|
||||
|
||||
$request = $this->prophesize()
|
||||
->willExtend(Request::class);
|
||||
|
||||
@@ -44,7 +44,7 @@ class ActivityTypeTest extends KernelTestCase
|
||||
$prophet = new Prophet();
|
||||
|
||||
$this->formBuilder = static::getContainer()
|
||||
->get('form.factory')
|
||||
->get(\Symfony\Component\Form\FormFactoryInterface::class)
|
||||
->createBuilder(FormType::class, null, [
|
||||
'csrf_protection' => false,
|
||||
'csrf_field_name' => '_token',
|
||||
@@ -54,10 +54,10 @@ class ActivityTypeTest extends KernelTestCase
|
||||
$request->setLocale('fr');
|
||||
|
||||
self::$kernel->getContainer()
|
||||
->get('request_stack')
|
||||
->get(\Symfony\Component\HttpFoundation\RequestStack::class)
|
||||
->push($request);
|
||||
|
||||
$em = static::getContainer()->get('doctrine.orm.entity_manager');
|
||||
$em = static::getContainer()->get(\Doctrine\ORM\EntityManager::class);
|
||||
|
||||
$this->user = $em
|
||||
->getRepository(User::class)
|
||||
@@ -68,7 +68,7 @@ class ActivityTypeTest extends KernelTestCase
|
||||
$token = $prophet->prophesize();
|
||||
$token->willExtend(AbstractToken::class);
|
||||
$token->getUser()->willReturn($this->user);
|
||||
static::getContainer()->get('security.token_storage')
|
||||
static::getContainer()->get(\Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface::class)
|
||||
->setToken($token->reveal());
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ use Chill\ActivityBundle\Entity\ActivityType;
|
||||
use Chill\ActivityBundle\Form\Type\TranslatableActivityType;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||
use Symfony\Component\Form\Extension\Core\Type\FormType;
|
||||
use Symfony\Component\Form\FormFactoryInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
@@ -33,7 +34,7 @@ class TranslatableActivityTypeTest extends KernelTestCase
|
||||
self::bootKernel();
|
||||
|
||||
$this->builder = self::getContainer()
|
||||
->get('form.factory')
|
||||
->get(FormFactoryInterface::class)
|
||||
->createBuilder(FormType::class, null, [
|
||||
'csrf_protection' => false,
|
||||
'csrf_field_name' => '_token',
|
||||
@@ -42,7 +43,7 @@ class TranslatableActivityTypeTest extends KernelTestCase
|
||||
$request = new \Symfony\Component\HttpFoundation\Request();
|
||||
$request->setLocale('fr');
|
||||
|
||||
static::getContainer()->get('request_stack')
|
||||
static::getContainer()->get(\Symfony\Component\HttpFoundation\RequestStack::class)
|
||||
->push($request);
|
||||
}
|
||||
|
||||
@@ -87,7 +88,7 @@ class TranslatableActivityTypeTest extends KernelTestCase
|
||||
*/
|
||||
protected function getRandomType(mixed $active = true)
|
||||
{
|
||||
$types = static::getContainer()->get('doctrine.orm.entity_manager')
|
||||
$types = static::getContainer()->get(\Doctrine\ORM\EntityManager::class)
|
||||
->getRepository(ActivityType::class)
|
||||
->findBy(['active' => $active]);
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ final class RemoteCalendarMSGraphSyncControllerTest extends WebTestCase
|
||||
$this->assertResponseStatusCodeSame(202);
|
||||
|
||||
/** @var \Symfony\Component\Messenger\Transport\InMemory\InMemoryTransport $transport */
|
||||
$transport = self::getContainer()->get('messenger.transport.async');
|
||||
$transport = self::getContainer()->get(\Symfony\Component\Messenger\Transport\TransportInterface::class);
|
||||
$this->assertCount(1, $transport->getSent());
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ final class AgentAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.calendar.export.agent_aggregator');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\CalendarBundle\Export\Aggregator\AgentAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator(): AgentAggregator
|
||||
|
||||
@@ -36,7 +36,7 @@ final class CancelReasonAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.calendar.export.cancel_reason_aggregator');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\CalendarBundle\Export\Aggregator\CancelReasonAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator(): CancelReasonAggregator
|
||||
|
||||
@@ -36,7 +36,7 @@ final class JobAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.calendar.export.job_aggregator');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\CalendarBundle\Export\Aggregator\JobAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator(): JobAggregator
|
||||
|
||||
@@ -36,7 +36,7 @@ final class LocationAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.calendar.export.location_aggregator');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\CalendarBundle\Export\Aggregator\LocationAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator(): LocationAggregator
|
||||
|
||||
@@ -36,7 +36,7 @@ final class LocationTypeAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.calendar.export.location_type_aggregator');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\CalendarBundle\Export\Aggregator\LocationTypeAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator(): LocationTypeAggregator
|
||||
|
||||
@@ -36,7 +36,7 @@ final class MonthYearAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.calendar.export.month_aggregator');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\CalendarBundle\Export\Aggregator\MonthYearAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator(): MonthYearAggregator
|
||||
|
||||
@@ -36,7 +36,7 @@ final class ScopeAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.calendar.export.scope_aggregator');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\CalendarBundle\Export\Aggregator\ScopeAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator(): ScopeAggregator
|
||||
|
||||
@@ -43,7 +43,7 @@ final class AgentFilterTest extends AbstractFilterTest
|
||||
$request->willExtend(\Symfony\Component\HttpFoundation\Request::class);
|
||||
$request->getLocale()->willReturn('fr');
|
||||
|
||||
$this->filter = self::getContainer()->get('chill.calendar.export.agent_filter');
|
||||
$this->filter = self::getContainer()->get(\Chill\CalendarBundle\Export\Filter\AgentFilter::class);
|
||||
}
|
||||
|
||||
public function getFilter(): AgentFilter
|
||||
|
||||
@@ -43,7 +43,7 @@ final class BetweenDatesFilterTest extends AbstractFilterTest
|
||||
$request->willExtend(\Symfony\Component\HttpFoundation\Request::class);
|
||||
$request->getLocale()->willReturn('fr');
|
||||
|
||||
$this->filter = self::getContainer()->get('chill.calendar.export.between_dates_filter');
|
||||
$this->filter = self::getContainer()->get(\Chill\CalendarBundle\Export\Filter\BetweenDatesFilter::class);
|
||||
}
|
||||
|
||||
public function getFilter(): BetweenDatesFilter
|
||||
|
||||
@@ -44,7 +44,7 @@ final class JobFilterTest extends AbstractFilterTest
|
||||
$request->willExtend(\Symfony\Component\HttpFoundation\Request::class);
|
||||
$request->getLocale()->willReturn('fr');
|
||||
|
||||
$this->filter = self::getContainer()->get('chill.calendar.export.job_filter');
|
||||
$this->filter = self::getContainer()->get(\Chill\CalendarBundle\Export\Filter\JobFilter::class);
|
||||
}
|
||||
|
||||
public function getFilter(): JobFilter
|
||||
|
||||
@@ -44,7 +44,7 @@ final class ScopeFilterTest extends AbstractFilterTest
|
||||
$request->willExtend(\Symfony\Component\HttpFoundation\Request::class);
|
||||
$request->getLocale()->willReturn('fr');
|
||||
|
||||
$this->filter = self::getContainer()->get('chill.calendar.export.scope_filter');
|
||||
$this->filter = self::getContainer()->get(\Chill\CalendarBundle\Export\Filter\ScopeFilter::class);
|
||||
}
|
||||
|
||||
public function getFilter(): ScopeFilter
|
||||
|
||||
@@ -40,6 +40,8 @@ class CustomFieldsGroupController extends AbstractController
|
||||
private readonly CustomFieldProvider $customFieldProvider,
|
||||
private readonly TranslatorInterface $translator,
|
||||
private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry,
|
||||
private readonly \Twig\Loader\FilesystemLoader $filesystemLoader,
|
||||
private readonly \Symfony\Component\Form\FormFactoryInterface $formFactory,
|
||||
) {}
|
||||
|
||||
/**
|
||||
@@ -204,7 +206,7 @@ class CustomFieldsGroupController extends AbstractController
|
||||
$form->add('submit_render', SubmitType::class, ['label' => 'POST AND RENDER']);
|
||||
$form->handleRequest($request);
|
||||
|
||||
$this->get('twig.loader')
|
||||
$this->filesystemLoader
|
||||
->addPath(
|
||||
__DIR__.'/../Tests/Fixtures/App/app/Resources/views/',
|
||||
$namespace = 'test'
|
||||
@@ -297,7 +299,7 @@ class CustomFieldsGroupController extends AbstractController
|
||||
$customfield = new CustomField()
|
||||
->setCustomFieldsGroup($customFieldsGroup);
|
||||
|
||||
$builder = $this->get('form.factory')
|
||||
$builder = $this->formFactory
|
||||
->createNamedBuilder('', FormType::class, $customfield, [
|
||||
'method' => 'GET',
|
||||
'action' => $this->generateUrl('customfield_new'),
|
||||
|
||||
@@ -40,7 +40,7 @@ final class CustomFieldsChoiceTest extends KernelTestCase
|
||||
self::bootKernel();
|
||||
|
||||
$this->cfProvider = self::$kernel->getContainer()
|
||||
->get('chill.custom_field.provider');
|
||||
->get(\Chill\CustomFieldsBundle\Service\CustomFieldProvider::class);
|
||||
$this->cfChoice = $this->cfProvider->getCustomFieldByType('choice');
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,10 @@ final class CustomFieldsNumberTest extends \Symfony\Bundle\FrameworkBundle\Test\
|
||||
self::bootKernel();
|
||||
|
||||
$this->customFieldNumber = self::$kernel->getContainer()
|
||||
->get('chill.custom_field.number');
|
||||
->get(\Chill\CustomFieldsBundle\CustomFields\CustomFieldNumber::class);
|
||||
|
||||
$this->formBuilder = self::$kernel->getContainer()
|
||||
->get('form.factory')
|
||||
->get(\Symfony\Component\Form\FormFactoryInterface::class)
|
||||
->createBuilder('form', null, [
|
||||
'csrf_protection' => false,
|
||||
'csrf_field_name' => '_token',
|
||||
@@ -48,7 +48,7 @@ final class CustomFieldsNumberTest extends \Symfony\Bundle\FrameworkBundle\Test\
|
||||
$request->setLocale('fr');
|
||||
|
||||
self::$kernel->getContainer()
|
||||
->get('request_stack')
|
||||
->get(\Symfony\Component\HttpFoundation\RequestStack::class)
|
||||
->push($request);
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ final class CustomFieldsNumberTest extends \Symfony\Bundle\FrameworkBundle\Test\
|
||||
$cfGroup = new \Chill\CustomFieldsBundle\Entity\CustomFieldsGroup()
|
||||
->addCustomField($cf);
|
||||
|
||||
$form = self::$kernel->getContainer()->get('form.factory')
|
||||
$form = self::$kernel->getContainer()->get(\Symfony\Component\Form\FormFactoryInterface::class)
|
||||
->createBuilder(\Chill\CustomFieldsBundle\Form\Type\CustomFieldType::class, [], [
|
||||
'group' => $cfGroup,
|
||||
])
|
||||
@@ -149,7 +149,7 @@ final class CustomFieldsNumberTest extends \Symfony\Bundle\FrameworkBundle\Test\
|
||||
$cfGroup = new \Chill\CustomFieldsBundle\Entity\CustomFieldsGroup()
|
||||
->addCustomField($cf);
|
||||
|
||||
$form = self::$kernel->getContainer()->get('form.factory')
|
||||
$form = self::$kernel->getContainer()->get(\Symfony\Component\Form\FormFactoryInterface::class)
|
||||
->createBuilder(\Chill\CustomFieldsBundle\Form\Type\CustomFieldType::class, [], [
|
||||
'group' => $cfGroup,
|
||||
])
|
||||
|
||||
@@ -31,7 +31,7 @@ final class CustomFieldsTextTest extends WebTestCase
|
||||
{
|
||||
self::bootKernel();
|
||||
$this->customFieldProvider = self::$kernel->getContainer()
|
||||
->get('chill.custom_field.provider');
|
||||
->get(\Chill\CustomFieldsBundle\Service\CustomFieldProvider::class);
|
||||
}
|
||||
|
||||
public function testCustomFieldsTextExists(): void
|
||||
|
||||
@@ -34,7 +34,7 @@ final class PostTextIntegerExtensionTest extends KernelTestCase
|
||||
|
||||
$container = self::$kernel->getContainer();
|
||||
|
||||
$this->formBuilder = $container->get('form.factory')
|
||||
$this->formBuilder = $container->get(\Symfony\Component\Form\FormFactoryInterface::class)
|
||||
->createBuilder('form', null);
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ final class PostTextNumberExtensionTest extends KernelTestCase
|
||||
|
||||
$container = self::$kernel->getContainer();
|
||||
|
||||
$this->formBuilder = $container->get('form.factory')
|
||||
$this->formBuilder = $container->get(\Symfony\Component\Form\FormFactoryInterface::class)
|
||||
->createBuilder('form', null);
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ final class CustomFieldsHelperTest extends KernelTestCase
|
||||
|
||||
$container = self::$kernel->getContainer();
|
||||
|
||||
$this->cfHelper = $container->get('chill.custom_field.helper');
|
||||
$this->cfHelper = $container->get(\Chill\CustomFieldsBundle\Service\CustomFieldsHelper::class);
|
||||
|
||||
$this->randomCFText = new CustomField()
|
||||
->setSlug('my-slug')
|
||||
|
||||
@@ -31,17 +31,17 @@ final class CustomFieldRenderingTwigTest extends KernelTestCase
|
||||
{
|
||||
self::bootKernel();
|
||||
$this->cfRendering = self::$kernel->getContainer()
|
||||
->get('chill.custom_field.twig.custom_fields_rendering');
|
||||
->get(\Chill\CustomFieldsBundle\Templating\Twig\CustomFieldRenderingTwig::class);
|
||||
|
||||
$this->cfProvider = self::$kernel->getContainer()
|
||||
->get('chill.custom_field.provider');
|
||||
->get(\Chill\CustomFieldsBundle\Service\CustomFieldProvider::class);
|
||||
|
||||
// set locale to fr
|
||||
$prophet = new \Prophecy\Prophet();
|
||||
$request = $prophet->prophesize();
|
||||
$request->willExtend(\Symfony\Component\HttpFoundation\Request::class);
|
||||
$request->getLocale()->willReturn('fr');
|
||||
self::$kernel->getContainer()->get('request_stack')
|
||||
self::$kernel->getContainer()->get(\Symfony\Component\HttpFoundation\RequestStack::class)
|
||||
->push($request->reveal());
|
||||
}
|
||||
|
||||
|
||||
@@ -33,17 +33,17 @@ final class CustomFieldsGroupRenderingTwigTest extends KernelTestCase
|
||||
{
|
||||
self::bootKernel();
|
||||
$this->cfRendering = self::$kernel->getContainer()
|
||||
->get('chill.custom_field.twig.custom_fields_group_rendering');
|
||||
->get(\Chill\CustomFieldsBundle\Templating\Twig\CustomFieldsGroupRenderingTwig::class);
|
||||
|
||||
$this->cfProvider = self::$kernel->getContainer()
|
||||
->get('chill.custom_field.provider');
|
||||
->get(\Chill\CustomFieldsBundle\Service\CustomFieldProvider::class);
|
||||
|
||||
// set locale to fr
|
||||
$prophet = new \Prophecy\Prophet();
|
||||
$request = $prophet->prophesize();
|
||||
$request->willExtend(\Symfony\Component\HttpFoundation\Request::class);
|
||||
$request->getLocale()->willReturn('fr');
|
||||
self::$kernel->getContainer()->get('request_stack')
|
||||
self::$kernel->getContainer()->get(\Symfony\Component\HttpFoundation\RequestStack::class)
|
||||
->push($request->reveal());
|
||||
}
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ final class EventSearchTest extends WebTestCase
|
||||
$this->prophet = new \Prophecy\Prophet();
|
||||
|
||||
$this->entityManager = self::$kernel->getContainer()
|
||||
->get('doctrine.orm.entity_manager');
|
||||
->get(\Doctrine\ORM\EntityManager::class);
|
||||
|
||||
$this->centerA = $this->entityManager
|
||||
->getRepository(\Chill\MainBundle\Entity\Center::class)
|
||||
|
||||
@@ -18,10 +18,13 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
*/
|
||||
class MenuController extends AbstractController
|
||||
{
|
||||
public function __construct(private readonly \Chill\MainBundle\Routing\MenuComposer $menuComposer)
|
||||
{
|
||||
}
|
||||
public function writeMenuAction($menu, $layout, $activeRouteKey = null, array $args = []): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
return $this->render($layout, [
|
||||
'menu_composer' => $this->get('chill.main.menu_composer'),
|
||||
'menu_composer' => $this->menuComposer,
|
||||
'menu' => $menu,
|
||||
'args' => $args,
|
||||
'activeRouteKey' => $activeRouteKey,
|
||||
|
||||
@@ -22,6 +22,7 @@ use Chill\MainBundle\Search\UnknowSearchNameException;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\Form\Extension\Core\Type\FormType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||
use Symfony\Component\Form\FormFactoryInterface;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
|
||||
@@ -32,7 +33,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
*/
|
||||
class SearchController extends AbstractController
|
||||
{
|
||||
public function __construct(protected SearchProvider $searchProvider, protected TranslatorInterface $translator, protected PaginatorFactory $paginatorFactory, protected SearchApi $searchApi) {}
|
||||
public function __construct(protected SearchProvider $searchProvider, protected TranslatorInterface $translator, protected PaginatorFactory $paginatorFactory, protected SearchApi $searchApi, private readonly FormFactoryInterface $formFactory) {}
|
||||
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/search/advanced/{name}', name: 'chill_main_advanced_search')]
|
||||
public function advancedSearchAction(mixed $name, Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
@@ -208,8 +209,7 @@ class SearchController extends AbstractController
|
||||
|
||||
protected function createAdvancedSearchForm($name, array $data = [])
|
||||
{
|
||||
$builder = $this
|
||||
->get('form.factory')
|
||||
$builder = $this->formFactory
|
||||
->createNamedBuilder(
|
||||
'',
|
||||
FormType::class,
|
||||
|
||||
@@ -17,6 +17,7 @@ use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use Prophecy\PhpUnit\ProphecyTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
/**
|
||||
* Helper to test filters.
|
||||
@@ -278,7 +279,7 @@ abstract class AbstractFilterTest extends KernelTestCase
|
||||
}
|
||||
|
||||
$catalogue = static::$kernel->getContainer()
|
||||
->get('translator')
|
||||
->get(TranslatorInterface::class)
|
||||
->getCatalogue();
|
||||
} catch (\Exception $ex) {
|
||||
$this->markTestIncomplete(
|
||||
|
||||
@@ -24,7 +24,7 @@ class UserNotificationFlagsPersistenceTest extends KernelTestCase
|
||||
public function testFlushPersistsNotificationFlagsChanges(): void
|
||||
{
|
||||
self::bootKernel();
|
||||
$em = self::getContainer()->get('doctrine')->getManager();
|
||||
$em = self::getContainer()->get(\Doctrine\Bundle\DoctrineBundle\Registry::class)->getManager();
|
||||
|
||||
$user = new User();
|
||||
$user->setUsername('user_'.bin2hex(random_bytes(4)));
|
||||
|
||||
@@ -347,8 +347,8 @@ final class ExportManagerTest extends KernelTestCase
|
||||
|
||||
return new ExportManager(
|
||||
$logger ?? self::getContainer()->get(LoggerInterface::class),
|
||||
$authorizationChecker ?? self::getContainer()->get('security.authorization_checker'),
|
||||
$authorizationHelper ?? self::getContainer()->get('chill.main.security.authorization.helper'),
|
||||
$authorizationChecker ?? self::getContainer()->get(\Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface::class),
|
||||
$authorizationHelper ?? self::getContainer()->get(\Chill\MainBundle\Security\Authorization\AuthorizationHelperInterface::class),
|
||||
$tokenStorage,
|
||||
$exports,
|
||||
$aggregators,
|
||||
|
||||
@@ -30,7 +30,7 @@ class NotificationRepositoryTest extends KernelTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
self::bootKernel();
|
||||
$this->entityManager = static::$kernel->getContainer()->get('doctrine.orm.entity_manager');
|
||||
$this->entityManager = static::$kernel->getContainer()->get(\Doctrine\ORM\EntityManager::class);
|
||||
$this->repository = new NotificationRepository($this->entityManager);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ class UserRepositoryTest extends KernelTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
self::bootKernel();
|
||||
$entityManager = static::$kernel->getContainer()->get('doctrine.orm.entity_manager');
|
||||
$entityManager = static::$kernel->getContainer()->get(\Doctrine\ORM\EntityManager::class);
|
||||
$connection = $entityManager->getConnection();
|
||||
$this->userRepository = new UserRepository($entityManager, $connection);
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ declare(strict_types=1);
|
||||
namespace Chill\MainBundle\Tests\Routing\Loader;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||
use Symfony\Component\Routing\RouterInterface;
|
||||
|
||||
/**
|
||||
* Test the route loader.
|
||||
@@ -27,7 +28,7 @@ final class RouteLoaderTest extends KernelTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
self::bootKernel();
|
||||
$this->router = self::$kernel->getContainer()->get('router');
|
||||
$this->router = self::$kernel->getContainer()->get(RouterInterface::class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -29,7 +29,7 @@ final class TokenManagerTest extends KernelTestCase
|
||||
self::bootKernel();
|
||||
|
||||
$logger = self::getContainer()
|
||||
->get('logger');
|
||||
->get(LoggerInterface::class);
|
||||
|
||||
$this->tokenManager = new TokenManager('secret', $logger);
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ final class MenuComposerTest extends KernelTestCase
|
||||
{
|
||||
self::bootKernel(['environment' => 'test']);
|
||||
$this->menuComposer = self::getContainer()
|
||||
->get('chill.main.menu_composer');
|
||||
->get(\Chill\MainBundle\Routing\MenuComposer::class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -53,9 +53,9 @@ class NotificationToUserGroupsOnTransitionTest extends KernelTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
self::bootKernel();
|
||||
$this->twig = self::getContainer()->get('twig');
|
||||
$this->twig = self::getContainer()->get(\Twig\Environment::class);
|
||||
$this->bodyRenderer = self::getContainer()->get(BodyRendererInterface::class);
|
||||
$this->em = self::getContainer()->get('doctrine.orm.entity_manager');
|
||||
$this->em = self::getContainer()->get(\Doctrine\ORM\EntityManager::class);
|
||||
}
|
||||
|
||||
public function testOnCompletedSendNotificationToUserGroupWithEmailAddress(): void
|
||||
|
||||
@@ -55,7 +55,7 @@ final class AccompanyingPeriodConfidentialTest extends WebTestCase
|
||||
$maxResults = $maxGenerated * 8;
|
||||
|
||||
self::bootKernel();
|
||||
$em = self::$kernel->getContainer()->get('doctrine.orm.entity_manager');
|
||||
$em = self::$kernel->getContainer()->get(\Doctrine\ORM\EntityManager::class);
|
||||
|
||||
$qb = $em->createQueryBuilder();
|
||||
$personIds = $qb
|
||||
@@ -101,7 +101,7 @@ final class AccompanyingPeriodConfidentialTest extends WebTestCase
|
||||
|
||||
$period = self::getContainer()->get(AccompanyingPeriodRepository::class)
|
||||
->find($periodId);
|
||||
$em = self::$kernel->getContainer()->get('doctrine.orm.entity_manager');
|
||||
$em = self::$kernel->getContainer()->get(\Doctrine\ORM\EntityManager::class);
|
||||
|
||||
$violations = self::$validator->validate($period, null, ['confirmed']);
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ final class AccompanyingPeriodControllerTest extends WebTestCase
|
||||
{
|
||||
self::bootKernel();
|
||||
self::$em = self::$kernel->getContainer()
|
||||
->get('doctrine.orm.entity_manager');
|
||||
->get(\Doctrine\ORM\EntityManager::class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -46,7 +46,7 @@ final class PersonAddressControllerTest extends WebTestCase
|
||||
self::bootKernel();
|
||||
|
||||
$em = self::$kernel->getContainer()
|
||||
->get('doctrine.orm.entity_manager');
|
||||
->get(\Doctrine\ORM\EntityManager::class);
|
||||
|
||||
$center = $em->getRepository(\Chill\MainBundle\Entity\Center::class)
|
||||
->findOneBy(['name' => 'Center A']);
|
||||
@@ -69,7 +69,7 @@ final class PersonAddressControllerTest extends WebTestCase
|
||||
self::bootKernel();
|
||||
|
||||
$this->em = self::$kernel->getContainer()
|
||||
->get('doctrine.orm.entity_manager');
|
||||
->get(\Doctrine\ORM\EntityManager::class);
|
||||
|
||||
$this->postalCode = $this->em->getRepository(\Chill\MainBundle\Entity\PostalCode::class)
|
||||
->findOneBy(['code' => 1000]);
|
||||
|
||||
@@ -49,7 +49,7 @@ final class PersonControllerUpdateWithHiddenFieldsTest extends WebTestCase
|
||||
self::bootKernel(['environment' => 'test_with_hidden_fields']);
|
||||
|
||||
$this->em = self::$kernel->getContainer()
|
||||
->get('doctrine.orm.entity_manager');
|
||||
->get(\Doctrine\ORM\EntityManager::class);
|
||||
|
||||
$center = $this->em->getRepository(\Chill\MainBundle\Entity\Center::class)
|
||||
->findOneBy(['name' => 'Center A']);
|
||||
|
||||
@@ -43,7 +43,7 @@ class WorkflowSignatureCancelControllerStepTest extends WebTestCase
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->formFactory = self::getContainer()->get('form.factory');
|
||||
$this->formFactory = self::getContainer()->get(\Symfony\Component\Form\FormFactoryInterface::class);
|
||||
$this->signatureStepStateChanger = self::getContainer()->get(SignatureStepStateChanger::class);
|
||||
$this->chillUrlGenerator = self::getContainer()->get(ChillUrlGeneratorInterface::class);
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ final class AdministrativeLocationAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_administrative_location');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\AdministrativeLocationAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator(): AdministrativeLocationAggregator
|
||||
|
||||
@@ -29,7 +29,7 @@ final class ClosingMotiveAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_closingmotive');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\ClosingMotiveAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator(): ClosingMotiveAggregator
|
||||
|
||||
@@ -29,7 +29,7 @@ final class ConfidentialAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_confidential');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\ConfidentialAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator(): ConfidentialAggregator
|
||||
|
||||
@@ -29,7 +29,7 @@ final class DurationAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_duration');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\DurationAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator(): DurationAggregator
|
||||
|
||||
@@ -29,7 +29,7 @@ final class EmergencyAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_emergency');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\EmergencyAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator(): EmergencyAggregator
|
||||
|
||||
@@ -29,7 +29,7 @@ final class EvaluationAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_evaluation');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\EvaluationAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator(): EvaluationAggregator
|
||||
|
||||
@@ -31,7 +31,7 @@ final class GeographicalUnitStatAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_geographicalunitstat');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\GeographicalUnitStatAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator(): GeographicalUnitStatAggregator
|
||||
|
||||
@@ -29,7 +29,7 @@ final class IntensityAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_intensity');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\IntensityAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator(): IntensityAggregator
|
||||
|
||||
@@ -29,7 +29,7 @@ final class OriginAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_origin');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\OriginAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator(): OriginAggregator
|
||||
|
||||
@@ -30,7 +30,7 @@ final class ReferrerAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_referrer');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\ReferrerAggregator::class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -29,7 +29,7 @@ final class RequestorAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_requestor');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\RequestorAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator(): RequestorAggregator
|
||||
|
||||
@@ -29,7 +29,7 @@ final class ScopeAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_referrer_scope');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\ScopeAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator(): ScopeAggregator
|
||||
|
||||
@@ -29,7 +29,7 @@ final class SocialActionAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_socialaction');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\SocialActionAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator(): SocialActionAggregator
|
||||
|
||||
@@ -29,7 +29,7 @@ final class SocialIssueAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_socialissue');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\SocialIssueAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator(): SocialIssueAggregator
|
||||
|
||||
@@ -30,7 +30,7 @@ final class StepAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_step');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\StepAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator(): StepAggregator
|
||||
|
||||
@@ -30,7 +30,7 @@ final class UserJobAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_referrer_job');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\UserJobAggregator::class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -29,7 +29,7 @@ final class EvaluationTypeAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_evaluationtype');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\EvaluationAggregators\EvaluationTypeAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator(): EvaluationTypeAggregator
|
||||
|
||||
@@ -30,7 +30,7 @@ final class ChildrenNumberAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_household_childrennumber');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\HouseholdAggregators\ChildrenNumberAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator(): ChildrenNumberAggregator
|
||||
|
||||
@@ -30,7 +30,7 @@ final class CompositionAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_household_composition');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\HouseholdAggregators\CompositionAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator(): CompositionAggregator
|
||||
|
||||
@@ -30,7 +30,7 @@ final class AgeAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_age');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\PersonAggregators\AgeAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator(): AgeAggregator
|
||||
|
||||
@@ -29,7 +29,7 @@ final class CountryOfBirthAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_country_of_birth');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\PersonAggregators\CountryOfBirthAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator(): CountryOfBirthAggregator
|
||||
|
||||
@@ -29,7 +29,7 @@ final class GenderAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_gender');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\PersonAggregators\GenderAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator(): GenderAggregator
|
||||
|
||||
@@ -32,7 +32,7 @@ final class HouseholdPositionAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_household_position');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\PersonAggregators\HouseholdPositionAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator(): HouseholdPositionAggregator
|
||||
|
||||
@@ -29,7 +29,7 @@ final class MaritalStatusAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_marital_status');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\PersonAggregators\MaritalStatusAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator(): MaritalStatusAggregator
|
||||
|
||||
@@ -29,7 +29,7 @@ final class NationalityAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_nationality');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\PersonAggregators\NationalityAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator(): NationalityAggregator
|
||||
|
||||
@@ -29,7 +29,7 @@ final class ActionTypeAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_action_type');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\ActionTypeAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator(): ActionTypeAggregator
|
||||
|
||||
@@ -29,7 +29,7 @@ final class GoalAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_goal');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\GoalAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator(): GoalAggregator
|
||||
|
||||
@@ -29,7 +29,7 @@ final class GoalResultAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_goalresult');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\GoalResultAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator(): GoalResultAggregator
|
||||
|
||||
@@ -29,7 +29,7 @@ final class JobAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_treatingagent_job');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\JobAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator(): JobAggregator
|
||||
|
||||
@@ -29,7 +29,7 @@ final class ResultAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_result');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\ResultAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator(): ResultAggregator
|
||||
|
||||
@@ -29,7 +29,7 @@ final class ScopeAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_treatingagent_scope');
|
||||
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\ScopeAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator(): ScopeAggregator
|
||||
|
||||
@@ -43,7 +43,7 @@ final class ListPersonTest extends AbstractExportTest
|
||||
|
||||
$request->getLocale()->willReturn('fr');
|
||||
|
||||
self::getContainer()->get('request_stack')
|
||||
self::getContainer()->get(\Symfony\Component\HttpFoundation\RequestStack::class)
|
||||
->push($request->reveal());
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ final class StatAccompanyingCourseDurationTest extends AbstractExportTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->export = self::getContainer()->get('chill.person.export.avg_accompanyingcourse_duration');
|
||||
$this->export = self::getContainer()->get(\Chill\PersonBundle\Export\Export\StatAccompanyingCourseDuration::class);
|
||||
}
|
||||
|
||||
public function getExport()
|
||||
|
||||
@@ -30,7 +30,7 @@ final class ActiveOnDateFilterTest extends AbstractFilterTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->filter = self::getContainer()->get('chill.person.export.filter_activeondate');
|
||||
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\ActiveOnDateFilter::class);
|
||||
}
|
||||
|
||||
public function getFilter(): ActiveOnDateFilter
|
||||
|
||||
@@ -30,7 +30,7 @@ final class ActiveOneDayBetweenDatesFilterTest extends AbstractFilterTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->filter = self::getContainer()->get('chill.person.export.filter_activeonedaybetweendates');
|
||||
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\ActiveOneDayBetweenDatesFilter::class);
|
||||
}
|
||||
|
||||
public function getFilter(): ActiveOneDayBetweenDatesFilter
|
||||
|
||||
@@ -29,7 +29,7 @@ final class AdministrativeLocationFilterTest extends AbstractFilterTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->filter = self::getContainer()->get('chill.person.export.filter_administrative_location');
|
||||
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\AdministrativeLocationFilter::class);
|
||||
}
|
||||
|
||||
public function getFilter(): AdministrativeLocationFilter
|
||||
|
||||
@@ -30,7 +30,7 @@ final class ClosingMotiveFilterTest extends AbstractFilterTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->filter = self::getContainer()->get('chill.person.export.filter_closingmotive');
|
||||
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\ClosingMotiveFilter::class);
|
||||
}
|
||||
|
||||
public function getFilter(): ClosingMotiveFilter
|
||||
|
||||
@@ -28,7 +28,7 @@ final class ConfidentialFilterTest extends AbstractFilterTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->filter = self::getContainer()->get('chill.person.export.filter_confidential');
|
||||
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\ConfidentialFilter::class);
|
||||
}
|
||||
|
||||
public function getFilter(): ConfidentialFilter
|
||||
|
||||
@@ -28,7 +28,7 @@ final class EmergencyFilterTest extends AbstractFilterTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->filter = self::getContainer()->get('chill.person.export.filter_emergency');
|
||||
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\EmergencyFilter::class);
|
||||
}
|
||||
|
||||
public function getFilter(): EmergencyFilter
|
||||
|
||||
@@ -29,7 +29,7 @@ final class EvaluationFilterTest extends AbstractFilterTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->filter = self::getContainer()->get('chill.person.export.filter_evaluation');
|
||||
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\EvaluationFilter::class);
|
||||
}
|
||||
|
||||
public function getFilter(): EvaluationFilter
|
||||
|
||||
@@ -31,7 +31,7 @@ final class GeographicalUnitStatFilterTest extends AbstractFilterTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->filter = self::getContainer()->get('chill.person.export.filter_geographicalunitstat');
|
||||
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\GeographicalUnitStatFilter::class);
|
||||
}
|
||||
|
||||
public function getFilter(): GeographicalUnitStatFilter
|
||||
|
||||
@@ -29,7 +29,7 @@ final class IntensityFilterTest extends AbstractFilterTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->filter = self::getContainer()->get('chill.person.export.filter_intensity');
|
||||
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\IntensityFilter::class);
|
||||
}
|
||||
|
||||
public function getFilter(): IntensityFilter
|
||||
|
||||
@@ -30,7 +30,7 @@ final class OpenBetweenDatesFilterTest extends AbstractFilterTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->filter = self::getContainer()->get('chill.person.export.filter_openbetweendates');
|
||||
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\OpenBetweenDatesFilter::class);
|
||||
}
|
||||
|
||||
public function getFilter(): OpenBetweenDatesFilter
|
||||
|
||||
@@ -30,7 +30,7 @@ final class OriginFilterTest extends AbstractFilterTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->filter = self::getContainer()->get('chill.person.export.filter_origin');
|
||||
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\OriginFilter::class);
|
||||
}
|
||||
|
||||
public function getFilter(): OriginFilter
|
||||
|
||||
@@ -29,7 +29,7 @@ final class RequestorFilterTest extends AbstractFilterTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->filter = self::getContainer()->get('chill.person.export.filter_requestor');
|
||||
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\RequestorFilter::class);
|
||||
}
|
||||
|
||||
public function getFilter(): RequestorFilter
|
||||
|
||||
@@ -31,7 +31,7 @@ final class SocialActionFilterTest extends AbstractFilterTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->filter = self::getContainer()->get('chill.person.export.filter_socialaction');
|
||||
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\SocialActionFilter::class);
|
||||
}
|
||||
|
||||
public function getFilter(): SocialActionFilter
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user