Add AccompanyingCourseStepHistory counting capabilities

The newly created CountAccompanyingCourseStepHistory class counts changes in AccompanyingPeriod status. Corresponding test file ensures the correct functionality. Supporting translations and necessary export declarations have been added to facilitate this change.
This commit is contained in:
2024-01-29 09:55:02 +01:00
parent f8840d89bf
commit b6ea857389
5 changed files with 263 additions and 69 deletions

View File

@@ -0,0 +1,48 @@
<?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 src\Bundle\ChillPersonBundle\Tests\Export\Export;
use Chill\MainBundle\Test\Export\AbstractExportTest;
use Chill\PersonBundle\Export\Declarations;
use Chill\PersonBundle\Export\Export\CountAccompanyingCourseStepHistory;
use Doctrine\ORM\EntityManagerInterface;
/**
* @internal
*
* @coversNothing
*/
final class CountAccompanyingCourseStepHistoryTest extends AbstractExportTest
{
protected function setUp(): void
{
self::bootKernel();
}
public function getExport()
{
$em = self::$container->get(EntityManagerInterface::class);
yield new CountAccompanyingCourseStepHistory($em, $this->getParameters(true));
yield new CountAccompanyingCourseStepHistory($em, $this->getParameters(false));
}
public function getFormData(): array
{
return [[]];
}
public function getModifiersCombination()
{
return [[Declarations::ACP_TYPE], [Declarations::ACP_TYPE, Declarations::ACP_STEP_HISTORY]];
}
}