mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-05 14:25:00 +00:00
Refactor filters and aggregators of "acpwusers" for using the acpw referrer history instead
This commit is contained in:
@@ -11,6 +11,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Tests\Export\Aggregator\SocialWorkAggregators;
|
||||
|
||||
use Chill\MainBundle\Service\RollingDate\RollingDate;
|
||||
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork;
|
||||
use Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\ReferrerAggregator;
|
||||
@@ -39,7 +40,10 @@ final class ReferrerAggregatorTest extends AbstractAggregatorTest
|
||||
public function getFormData(): array
|
||||
{
|
||||
return [
|
||||
[],
|
||||
[], // there are previous saved export which does not contains any data
|
||||
[
|
||||
'referrer_at' => new RollingDate(RollingDate::T_TODAY)
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
|
@@ -12,6 +12,7 @@ declare(strict_types=1);
|
||||
namespace Chill\PersonBundle\Tests\Export\Filter\SocialWorkFilters;
|
||||
|
||||
use Chill\MainBundle\Entity\User;
|
||||
use Chill\MainBundle\Service\RollingDate\RollingDate;
|
||||
use Chill\MainBundle\Test\Export\AbstractFilterTest;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Export\Filter\SocialWorkFilters\ReferrerFilter;
|
||||
@@ -47,8 +48,13 @@ final class ReferrerFilterTest extends AbstractFilterTest
|
||||
$data = [];
|
||||
|
||||
foreach ($users as $u) {
|
||||
$data[] = [
|
||||
'accepted_agents' => $u, // some saved export does not have the parameter "agent_at"
|
||||
];
|
||||
|
||||
$data[] = [
|
||||
'accepted_agents' => $u,
|
||||
'agent_at' => new RollingDate(RollingDate::T_TODAY)
|
||||
];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user