Export: add export "number of household associated with an activity"

This commit is contained in:
2023-12-04 16:30:09 +01:00
parent 673518e0eb
commit b17b2a8cfb
7 changed files with 425 additions and 0 deletions

View File

@@ -0,0 +1,60 @@
<?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\ActivityBundle\Tests\Export\Export\LinkedToACP;
use Chill\ActivityBundle\Export\Declarations;
use Chill\ActivityBundle\Export\Export\LinkedToACP\CountHouseholdOnActivity;
use Chill\MainBundle\Test\Export\AbstractExportTest;
use Chill\PersonBundle\Export\Declarations as PersonDeclarations;
use Doctrine\ORM\EntityManagerInterface;
/**
* @internal
*
* @coversNothing
*/
class CountHouseholdOnActivityTest extends AbstractExportTest
{
private EntityManagerInterface $entityManager;
protected function setUp(): void
{
self::bootKernel();
$this->entityManager = self::$container->get(EntityManagerInterface::class);
}
public function getExport()
{
yield new CountHouseholdOnActivity($this->entityManager, $this->getParameters(true));
yield new CountHouseholdOnActivity($this->entityManager, $this->getParameters(false));
}
public function getFormData()
{
return [
[],
];
}
public function getModifiersCombination()
{
return [
[
Declarations::ACTIVITY,
Declarations::ACTIVITY_ACP,
PersonDeclarations::ACP_TYPE,
PersonDeclarations::PERSON_TYPE,
PersonDeclarations::HOUSEHOLD_TYPE,
],
];
}
}

View File

@@ -0,0 +1,59 @@
<?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\ActivityBundle\Tests\Export\Export\LinkedToPerson;
use Chill\ActivityBundle\Export\Declarations;
use Chill\ActivityBundle\Export\Export\LinkedToPerson\CountHouseholdOnActivity;
use Chill\ActivityBundle\Repository\ActivityRepository;
use Chill\MainBundle\Test\Export\AbstractExportTest;
use Chill\PersonBundle\Export\Declarations as PersonDeclarations;
/**
* @internal
*
* @coversNothing
*/
class CountHouseholdOnActivityTest extends AbstractExportTest
{
private ActivityRepository $activityRepository;
protected function setUp(): void
{
self::bootKernel();
$this->activityRepository = self::$container->get(ActivityRepository::class);
}
public function getExport()
{
yield new CountHouseholdOnActivity($this->activityRepository, $this->getParameters(true));
yield new CountHouseholdOnActivity($this->activityRepository, $this->getParameters(false));
}
public function getFormData()
{
return [
[],
];
}
public function getModifiersCombination()
{
return [
[
Declarations::ACTIVITY,
Declarations::ACTIVITY_PERSON,
PersonDeclarations::PERSON_TYPE,
PersonDeclarations::HOUSEHOLD_TYPE,
],
];
}
}