diff --git a/src/Bundle/ChillMainBundle/Tests/Export/ExportGeneratorTest.php b/src/Bundle/ChillMainBundle/Tests/Export/ExportGeneratorTest.php index 97ad48cf8..2faa49c22 100644 --- a/src/Bundle/ChillMainBundle/Tests/Export/ExportGeneratorTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Export/ExportGeneratorTest.php @@ -29,6 +29,7 @@ use Chill\MainBundle\Repository\CenterRepositoryInterface; use Chill\MainBundle\Security\Authorization\AuthorizationHelperInterface; use Chill\MainBundle\Service\Regroupement\CenterRegroupementResolver; use Doctrine\ORM\NativeQuery; +use Doctrine\ORM\Query; use Doctrine\ORM\QueryBuilder; use PHPUnit\Framework\TestCase; use Prophecy\Argument; @@ -80,6 +81,10 @@ class ExportGeneratorTest extends TestCase $formatter = $this->prophesize(FormatterInterface::class); $query = $this->prophesize(QueryBuilder::class); + $query->getDQL()->willReturn('dummy'); + $dqlQuery = $this->prophesize(Query::class); + $dqlQuery->getSQL()->willReturn('dummy'); + $query->getQuery()->willReturn($dqlQuery->reveal()); // required methods $export->initiateQuery( @@ -103,7 +108,7 @@ class ExportGeneratorTest extends TestCase return true; }), - ['key' => 'form1'], + $formExportData, Argument::that(static fn ($context) => $context instanceof ExportGenerationContext && $context->byUser === $user), )->shouldBeCalled()->willReturn($query->reveal()); $export->getResult($query->reveal(), $formExportData, Argument::that(static fn (ExportGenerationContext $context) => $context->byUser === $user)) diff --git a/src/Bundle/ChillPersonBundle/Form/Type/PickSocialActionType.php b/src/Bundle/ChillPersonBundle/Form/Type/PickSocialActionType.php index 39aa5a4cb..d6115bd26 100644 --- a/src/Bundle/ChillPersonBundle/Form/Type/PickSocialActionType.php +++ b/src/Bundle/ChillPersonBundle/Form/Type/PickSocialActionType.php @@ -37,7 +37,7 @@ class PickSocialActionType extends AbstractType 'show_social_issue_parenthesis' => false, 'show_deactivated' => false, ]) - ->setNormalizer('choice_label', fn(Options $options, $value) => fn (SocialAction $sa) => $this->actionRender->renderString( + ->setNormalizer('choice_label', fn (Options $options, $value) => fn (SocialAction $sa) => $this->actionRender->renderString( $sa, [ SocialActionRender::SHOW_SOCIAL_ISSUE => $options['show_social_issue_parenthesis'],