tests added for filters and some aggregators

This commit is contained in:
2022-08-02 11:24:08 +02:00
parent 20c1a287d8
commit 28dc99ff3f
5 changed files with 222 additions and 5 deletions

View File

@@ -0,0 +1,58 @@
<?php
/**
* 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.
*/
declare(strict_types=1);
namespace Chill\PersonBundle\Tests\Export\Aggregator;
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
/**
* @internal
* @coversNothing
*/
final class ReferrerAggregatorTest extends AbstractAggregatorTest
{
private ReferrerAggregator $aggregator;
protected function setUp(): void
{
self::bootKernel();
$this->aggregator = self::$container->get('chill.person.export.aggregator_referrer');
}
public function getAggregator()
{
return $this->aggregator;
}
public function getFormData()
{
return [
[],
];
}
public function getQueryBuilders()
{
if (null === self::$kernel) {
self::bootKernel();
}
$em = self::$container
->get('doctrine.orm.entity_manager');
return [
$em->createQueryBuilder()
->select('count(acpw.id)')
->from('ChillPersonBundle:AccompanyingPeriodWork', 'acpw'),
];
}
}