mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
fix cs
This commit is contained in:
@@ -11,11 +11,15 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Tests\Export\Aggregator\AccompanyingCourseAggregators;
|
||||
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\AdministrativeLocationAggregator;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
final class AdministrativeLocationAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
private AdministrativeLocationAggregator $aggregator;
|
||||
@@ -51,8 +55,7 @@ final class AdministrativeLocationAggregatorTest extends AbstractAggregatorTest
|
||||
$em->createQueryBuilder()
|
||||
->select('count(acp.id)')
|
||||
->from(AccompanyingPeriod::class, 'acp')
|
||||
->join('acp.administrativeLocation', 'acploc')
|
||||
,
|
||||
->join('acp.administrativeLocation', 'acploc'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -11,11 +11,15 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Tests\Export\Aggregator\AccompanyingCourseAggregators;
|
||||
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\ClosingMotiveAggregator;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
final class ClosingMotiveAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
private ClosingMotiveAggregator $aggregator;
|
||||
@@ -51,8 +55,7 @@ final class ClosingMotiveAggregatorTest extends AbstractAggregatorTest
|
||||
$em->createQueryBuilder()
|
||||
->select('count(acp.id)')
|
||||
->from(AccompanyingPeriod::class, 'acp')
|
||||
->join('acp.closingMotive', 'acpmotive')
|
||||
,
|
||||
->join('acp.closingMotive', 'acpmotive'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -11,11 +11,15 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Tests\Export\Aggregator\AccompanyingCourseAggregators;
|
||||
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\ConfidentialAggregator;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
final class ConfidentialAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
private ConfidentialAggregator $aggregator;
|
||||
@@ -50,8 +54,7 @@ final class ConfidentialAggregatorTest extends AbstractAggregatorTest
|
||||
return [
|
||||
$em->createQueryBuilder()
|
||||
->select('count(acp.id)')
|
||||
->from(AccompanyingPeriod::class, 'acp')
|
||||
,
|
||||
->from(AccompanyingPeriod::class, 'acp'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -11,11 +11,15 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Tests\Export\Aggregator\AccompanyingCourseAggregators;
|
||||
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\DurationAggregator;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
final class DurationAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
private DurationAggregator $aggregator;
|
||||
@@ -50,8 +54,7 @@ final class DurationAggregatorTest extends AbstractAggregatorTest
|
||||
return [
|
||||
$em->createQueryBuilder()
|
||||
->select('count(acp.id)')
|
||||
->from(AccompanyingPeriod::class, 'acp')
|
||||
,
|
||||
->from(AccompanyingPeriod::class, 'acp'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -11,11 +11,15 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Tests\Export\Aggregator\AccompanyingCourseAggregators;
|
||||
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\EmergencyAggregator;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
final class EmergencyAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
private EmergencyAggregator $aggregator;
|
||||
@@ -50,8 +54,7 @@ final class EmergencyAggregatorTest extends AbstractAggregatorTest
|
||||
return [
|
||||
$em->createQueryBuilder()
|
||||
->select('count(acp.id)')
|
||||
->from(AccompanyingPeriod::class, 'acp')
|
||||
,
|
||||
->from(AccompanyingPeriod::class, 'acp'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -11,11 +11,15 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Tests\Export\Aggregator\AccompanyingCourseAggregators;
|
||||
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\EvaluationAggregator;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
final class EvaluationAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
private EvaluationAggregator $aggregator;
|
||||
@@ -52,8 +56,7 @@ final class EvaluationAggregatorTest extends AbstractAggregatorTest
|
||||
->select('count(acp.id)')
|
||||
->from(AccompanyingPeriod::class, 'acp')
|
||||
->join('acp.works', 'acpw')
|
||||
->join('acpw.accompanyingPeriodWorkEvaluations', 'workeval')
|
||||
,
|
||||
->join('acpw.accompanyingPeriodWorkEvaluations', 'workeval'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -11,11 +11,15 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Tests\Export\Aggregator\AccompanyingCourseAggregators;
|
||||
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\GeographicalUnitStatAggregator;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
final class GeographicalUnitStatAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
private GeographicalUnitStatAggregator $aggregator;
|
||||
@@ -50,8 +54,7 @@ final class GeographicalUnitStatAggregatorTest extends AbstractAggregatorTest
|
||||
return [
|
||||
$em->createQueryBuilder()
|
||||
->select('count(acp.id)')
|
||||
->from(AccompanyingPeriod::class, 'acp')
|
||||
,
|
||||
->from(AccompanyingPeriod::class, 'acp'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -11,11 +11,15 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Tests\Export\Aggregator\AccompanyingCourseAggregators;
|
||||
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\IntensityAggregator;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
final class IntensityAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
private IntensityAggregator $aggregator;
|
||||
@@ -50,8 +54,7 @@ final class IntensityAggregatorTest extends AbstractAggregatorTest
|
||||
return [
|
||||
$em->createQueryBuilder()
|
||||
->select('count(acp.id)')
|
||||
->from(AccompanyingPeriod::class, 'acp')
|
||||
,
|
||||
->from(AccompanyingPeriod::class, 'acp'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -11,11 +11,15 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Tests\Export\Aggregator\AccompanyingCourseAggregators;
|
||||
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\JobAggregator;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
final class JobAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
private JobAggregator $aggregator;
|
||||
@@ -51,8 +55,7 @@ final class JobAggregatorTest extends AbstractAggregatorTest
|
||||
$em->createQueryBuilder()
|
||||
->select('count(acp.id)')
|
||||
->from(AccompanyingPeriod::class, 'acp')
|
||||
->join('acp.job', 'acpjob')
|
||||
,
|
||||
->join('acp.job', 'acpjob'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -11,11 +11,15 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Tests\Export\Aggregator\AccompanyingCourseAggregators;
|
||||
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\OriginAggregator;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
final class OriginAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
private OriginAggregator $aggregator;
|
||||
@@ -51,8 +55,7 @@ final class OriginAggregatorTest extends AbstractAggregatorTest
|
||||
$em->createQueryBuilder()
|
||||
->select('count(acp.id)')
|
||||
->from(AccompanyingPeriod::class, 'acp')
|
||||
->join('acp.origin', 'acporigin')
|
||||
,
|
||||
->join('acp.origin', 'acporigin'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -11,11 +11,15 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Tests\Export\Aggregator\AccompanyingCourseAggregators;
|
||||
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\ReferrerAggregator;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
final class ReferrerAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
private ReferrerAggregator $aggregator;
|
||||
@@ -51,8 +55,7 @@ final class ReferrerAggregatorTest extends AbstractAggregatorTest
|
||||
$em->createQueryBuilder()
|
||||
->select('count(acp.id)')
|
||||
->from(AccompanyingPeriod::class, 'acp')
|
||||
->join('acp.user', 'acpuser')
|
||||
,
|
||||
->join('acp.user', 'acpuser'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -1,19 +1,32 @@
|
||||
<?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 Export\Aggregator\AccompanyingCourseAggregators;
|
||||
|
||||
use Chill\MainBundle\Entity\Scope;
|
||||
use Chill\MainBundle\Repository\ScopeRepositoryInterface;
|
||||
use Chill\MainBundle\Templating\TranslatableStringHelper;
|
||||
use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
|
||||
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\ReferrerScopeAggregator;
|
||||
use DateTimeImmutable;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Prophecy\Argument;
|
||||
use Prophecy\PhpUnit\ProphecyTrait;
|
||||
|
||||
class ReferrerScopeAggregatorTest extends AbstractAggregatorTest
|
||||
/**
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
final class ReferrerScopeAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
use ProphecyTrait;
|
||||
|
||||
@@ -37,8 +50,8 @@ class ReferrerScopeAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
return [
|
||||
[
|
||||
'date_calc' => new \DateTimeImmutable('now')
|
||||
]
|
||||
'date_calc' => new DateTimeImmutable('now'),
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
@@ -54,10 +67,7 @@ class ReferrerScopeAggregatorTest extends AbstractAggregatorTest
|
||||
$em->createQueryBuilder()
|
||||
->select('count(acp.id)')
|
||||
->from(AccompanyingPeriod::class, 'acp')
|
||||
->join('acp.scopes', 'acpscope')
|
||||
,
|
||||
->join('acp.scopes', 'acpscope'),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@@ -11,11 +11,15 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Tests\Export\Aggregator\AccompanyingCourseAggregators;
|
||||
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\RequestorAggregator;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
final class RequestorAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
private RequestorAggregator $aggregator;
|
||||
@@ -51,8 +55,7 @@ final class RequestorAggregatorTest extends AbstractAggregatorTest
|
||||
$em->createQueryBuilder()
|
||||
->select('count(acp.id)')
|
||||
->from(AccompanyingPeriod::class, 'acp')
|
||||
->join('acp.participations', 'acppart')
|
||||
,
|
||||
->join('acp.participations', 'acppart'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -11,11 +11,15 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Tests\Export\Aggregator\AccompanyingCourseAggregators;
|
||||
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\ScopeAggregator;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
final class ScopeAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
private ScopeAggregator $aggregator;
|
||||
@@ -51,8 +55,7 @@ final class ScopeAggregatorTest extends AbstractAggregatorTest
|
||||
$em->createQueryBuilder()
|
||||
->select('count(acp.id)')
|
||||
->from(AccompanyingPeriod::class, 'acp')
|
||||
->join('acp.scopes', 'acpscope')
|
||||
,
|
||||
->join('acp.scopes', 'acpscope'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -11,11 +11,15 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Tests\Export\Aggregator\AccompanyingCourseAggregators;
|
||||
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\SocialActionAggregator;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
final class SocialActionAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
private SocialActionAggregator $aggregator;
|
||||
@@ -51,8 +55,7 @@ final class SocialActionAggregatorTest extends AbstractAggregatorTest
|
||||
$em->createQueryBuilder()
|
||||
->select('count(acp.id)')
|
||||
->from(AccompanyingPeriod::class, 'acp')
|
||||
->join('acp.works', 'acpw')
|
||||
,
|
||||
->join('acp.works', 'acpw'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -11,11 +11,15 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Tests\Export\Aggregator\AccompanyingCourseAggregators;
|
||||
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\SocialIssueAggregator;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
final class SocialIssueAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
private SocialIssueAggregator $aggregator;
|
||||
@@ -51,8 +55,7 @@ final class SocialIssueAggregatorTest extends AbstractAggregatorTest
|
||||
$em->createQueryBuilder()
|
||||
->select('count(acp.id)')
|
||||
->from(AccompanyingPeriod::class, 'acp')
|
||||
->join('acp.socialIssues', 'acpsocialissue')
|
||||
,
|
||||
->join('acp.socialIssues', 'acpsocialissue'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -11,11 +11,16 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Tests\Export\Aggregator\AccompanyingCourseAggregators;
|
||||
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\StepAggregator;
|
||||
use DateTime;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
final class StepAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
private StepAggregator $aggregator;
|
||||
@@ -36,7 +41,7 @@ final class StepAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
return [
|
||||
[
|
||||
'on_date' => \DateTime::createFromFormat('Y-m-d', '2022-01-01'),
|
||||
'on_date' => DateTime::createFromFormat('Y-m-d', '2022-01-01'),
|
||||
],
|
||||
];
|
||||
}
|
||||
@@ -52,8 +57,7 @@ final class StepAggregatorTest extends AbstractAggregatorTest
|
||||
return [
|
||||
$em->createQueryBuilder()
|
||||
->select('count(acp.id)')
|
||||
->from(AccompanyingPeriod::class, 'acp')
|
||||
,
|
||||
->from(AccompanyingPeriod::class, 'acp'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -11,11 +11,15 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Tests\Export\Aggregator\EvaluationAggregators;
|
||||
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Export\Aggregator\EvaluationAggregators\EvaluationTypeAggregator;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
final class EvaluationTypeAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
private EvaluationTypeAggregator $aggregator;
|
||||
@@ -52,8 +56,7 @@ final class EvaluationTypeAggregatorTest extends AbstractAggregatorTest
|
||||
->select('count(acp.id)')
|
||||
->from(AccompanyingPeriod::class, 'acp')
|
||||
->join('acp.works', 'acpw')
|
||||
->join('acpw.accompanyingPeriodWorkEvaluations', 'workeval')
|
||||
,
|
||||
->join('acpw.accompanyingPeriodWorkEvaluations', 'workeval'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -11,11 +11,16 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Tests\Export\Aggregator\HouseholdAggregators;
|
||||
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Export\Aggregator\HouseholdAggregators\ChildrenNumberAggregator;
|
||||
use DateTime;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
final class ChildrenNumberAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
private ChildrenNumberAggregator $aggregator;
|
||||
@@ -36,7 +41,7 @@ final class ChildrenNumberAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
return [
|
||||
[
|
||||
'on_date' => \DateTime::createFromFormat('Y-m-d', '2022-07-01')
|
||||
'on_date' => DateTime::createFromFormat('Y-m-d', '2022-07-01'),
|
||||
],
|
||||
];
|
||||
}
|
||||
@@ -57,8 +62,7 @@ final class ChildrenNumberAggregatorTest extends AbstractAggregatorTest
|
||||
->join('acppart.person', 'partperson')
|
||||
->join('partperson.householdParticipations', 'member')
|
||||
->join('member.household', 'household')
|
||||
->join('household.compositions', 'composition')
|
||||
,
|
||||
->join('household.compositions', 'composition'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -11,11 +11,16 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Tests\Export\Aggregator\HouseholdAggregators;
|
||||
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Export\Aggregator\HouseholdAggregators\CompositionAggregator;
|
||||
use DateTime;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
final class CompositionAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
private CompositionAggregator $aggregator;
|
||||
@@ -36,7 +41,7 @@ final class CompositionAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
return [
|
||||
[
|
||||
'on_date' => \DateTime::createFromFormat('Y-m-d', '2022-07-01')
|
||||
'on_date' => DateTime::createFromFormat('Y-m-d', '2022-07-01'),
|
||||
],
|
||||
];
|
||||
}
|
||||
@@ -57,8 +62,7 @@ final class CompositionAggregatorTest extends AbstractAggregatorTest
|
||||
->join('acppart.person', 'partperson')
|
||||
->join('partperson.householdParticipations', 'member')
|
||||
->join('member.household', 'household')
|
||||
->join('household.compositions', 'composition')
|
||||
,
|
||||
->join('household.compositions', 'composition'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -16,6 +16,10 @@ use Chill\PersonBundle\Entity\Person;
|
||||
use Chill\PersonBundle\Export\Aggregator\PersonAggregators\CountryOfBirthAggregator;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
final class CountryOfBirthAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
private CountryOfBirthAggregator $aggregator;
|
||||
@@ -36,7 +40,7 @@ final class CountryOfBirthAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
return [
|
||||
['group_by_level' => 'continent'],
|
||||
['group_by_level' => 'country',],
|
||||
['group_by_level' => 'country'],
|
||||
];
|
||||
}
|
||||
|
||||
@@ -52,8 +56,7 @@ final class CountryOfBirthAggregatorTest extends AbstractAggregatorTest
|
||||
$em->createQueryBuilder()
|
||||
->select('count(person.id)')
|
||||
->from(Person::class, 'person')
|
||||
->leftJoin('person.countryOfBirth', 'countryOfBirth')
|
||||
,
|
||||
->leftJoin('person.countryOfBirth', 'countryOfBirth'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -15,9 +15,14 @@ use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
|
||||
use Chill\PersonBundle\Entity\Household\HouseholdMember;
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
use Chill\PersonBundle\Export\Aggregator\PersonAggregators\HouseholdPositionAggregator;
|
||||
use DateTime;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\ORM\Query\Expr;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
final class HouseholdPositionAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
private HouseholdPositionAggregator $aggregator;
|
||||
@@ -38,7 +43,7 @@ final class HouseholdPositionAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
return [
|
||||
[
|
||||
'date_position' => \DateTime::createFromFormat('Y-m-d', '2022-07-01')
|
||||
'date_position' => DateTime::createFromFormat('Y-m-d', '2022-07-01'),
|
||||
],
|
||||
];
|
||||
}
|
||||
@@ -56,8 +61,7 @@ final class HouseholdPositionAggregatorTest extends AbstractAggregatorTest
|
||||
->select('count(person.id)')
|
||||
->from(Person::class, 'person')
|
||||
->join(HouseholdMember::class, 'householdmember', Expr\Join::WITH, 'householdmember.person = person')
|
||||
->join('person.center', 'center')
|
||||
,
|
||||
->join('person.center', 'center'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -16,6 +16,10 @@ use Chill\PersonBundle\Entity\Person;
|
||||
use Chill\PersonBundle\Export\Aggregator\PersonAggregators\MaritalStatusAggregator;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
final class MaritalStatusAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
private MaritalStatusAggregator $aggregator;
|
||||
@@ -51,8 +55,7 @@ final class MaritalStatusAggregatorTest extends AbstractAggregatorTest
|
||||
$em->createQueryBuilder()
|
||||
->select('count(person.id)')
|
||||
->from(Person::class, 'person')
|
||||
->join('person.maritalStatus', 'personmarital')
|
||||
,
|
||||
->join('person.maritalStatus', 'personmarital'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -54,8 +54,7 @@ final class ActionTypeAggregatorTest extends AbstractAggregatorTest
|
||||
return [
|
||||
$em->createQueryBuilder()
|
||||
->select('count(acpw.id)')
|
||||
->from(AccompanyingPeriodWork::class, 'acpw')
|
||||
,
|
||||
->from(AccompanyingPeriodWork::class, 'acpw'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -54,8 +54,7 @@ final class GoalAggregatorTest extends AbstractAggregatorTest
|
||||
return [
|
||||
$em->createQueryBuilder()
|
||||
->select('count(acpw.id)')
|
||||
->from(AccompanyingPeriodWork::class, 'acpw')
|
||||
,
|
||||
->from(AccompanyingPeriodWork::class, 'acpw'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -11,11 +11,15 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Tests\Export\Aggregator\SocialWorkAggregators;
|
||||
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\GoalResultAggregator;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
final class GoalResultAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
private GoalResultAggregator $aggregator;
|
||||
@@ -53,8 +57,7 @@ final class GoalResultAggregatorTest extends AbstractAggregatorTest
|
||||
->from(AccompanyingPeriod::class, 'acp')
|
||||
->join('acp.works', 'acpw')
|
||||
->join('acpw.goals', 'goal')
|
||||
->join('goal.results', 'goalresult')
|
||||
,
|
||||
->join('goal.results', 'goalresult'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -11,11 +11,15 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Tests\Export\Aggregator\SocialWorkAggregators;
|
||||
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\JobAggregator;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
final class JobAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
private JobAggregator $aggregator;
|
||||
@@ -52,8 +56,7 @@ final class JobAggregatorTest extends AbstractAggregatorTest
|
||||
->select('count(acp.id)')
|
||||
->from(AccompanyingPeriod::class, 'acp')
|
||||
->join('acp.works', 'acpw')
|
||||
->join('acpw.referrers', 'acpwuser')
|
||||
,
|
||||
->join('acpw.referrers', 'acpwuser'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -54,8 +54,7 @@ final class ReferrerAggregatorTest extends AbstractAggregatorTest
|
||||
return [
|
||||
$em->createQueryBuilder()
|
||||
->select('count(acpw.id)')
|
||||
->from(AccompanyingPeriodWork::class, 'acpw')
|
||||
,
|
||||
->from(AccompanyingPeriodWork::class, 'acpw'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -54,8 +54,7 @@ final class ResultAggregatorTest extends AbstractAggregatorTest
|
||||
return [
|
||||
$em->createQueryBuilder()
|
||||
->select('count(acpw.id)')
|
||||
->from(AccompanyingPeriodWork::class, 'acpw')
|
||||
,
|
||||
->from(AccompanyingPeriodWork::class, 'acpw'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -11,11 +11,15 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Tests\Export\Aggregator\SocialWorkAggregators;
|
||||
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\ScopeAggregator;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
final class ScopeAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
private ScopeAggregator $aggregator;
|
||||
@@ -52,8 +56,7 @@ final class ScopeAggregatorTest extends AbstractAggregatorTest
|
||||
->select('count(acp.id)')
|
||||
->from(AccompanyingPeriod::class, 'acp')
|
||||
->join('acp.works', 'acpw')
|
||||
->join('acpw.referrers', 'acpwuser')
|
||||
,
|
||||
->join('acpw.referrers', 'acpwuser'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -15,7 +15,6 @@ use Chill\MainBundle\Test\Export\AbstractFilterTest;
|
||||
use Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\ActiveOnDateFilter;
|
||||
use DateTime;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
@@ -15,7 +15,6 @@ use Chill\MainBundle\Test\Export\AbstractFilterTest;
|
||||
use Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\ActiveOneDayBetweenDatesFilter;
|
||||
use DateTime;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
@@ -9,13 +9,12 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Tests\Export\Filter\AccompanyingCourseFilters;;
|
||||
namespace Chill\PersonBundle\Tests\Export\Filter\AccompanyingCourseFilters;
|
||||
|
||||
use Chill\MainBundle\Entity\Location;
|
||||
use Chill\MainBundle\Test\Export\AbstractFilterTest;
|
||||
use Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\AdministrativeLocationFilter;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
@@ -15,7 +15,6 @@ use Chill\MainBundle\Test\Export\AbstractFilterTest;
|
||||
use Chill\PersonBundle\Entity\SocialWork\Evaluation;
|
||||
use Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\EvaluationFilter;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
@@ -15,7 +15,6 @@ use Chill\MainBundle\Test\Export\AbstractFilterTest;
|
||||
use Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\GeographicalUnitStatFilter;
|
||||
use DateTime;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
@@ -15,7 +15,6 @@ use Chill\MainBundle\Test\Export\AbstractFilterTest;
|
||||
use Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\OpenBetweenDatesFilter;
|
||||
use DateTime;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
@@ -15,7 +15,6 @@ use Chill\MainBundle\Entity\User;
|
||||
use Chill\MainBundle\Test\Export\AbstractFilterTest;
|
||||
use Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\ReferrerFilter;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
@@ -14,7 +14,6 @@ namespace Chill\PersonBundle\Tests\Export\Filter\AccompanyingCourseFilters;
|
||||
use Chill\MainBundle\Test\Export\AbstractFilterTest;
|
||||
use Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\RequestorFilter;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
@@ -15,7 +15,6 @@ use Chill\MainBundle\Test\Export\AbstractFilterTest;
|
||||
use Chill\PersonBundle\Entity\SocialWork\SocialAction;
|
||||
use Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\SocialActionFilter;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
@@ -51,7 +51,7 @@ final class EvaluationTypeFilterTest extends AbstractFilterTest
|
||||
|
||||
foreach ($array as $r) {
|
||||
$data[] = [
|
||||
'accepted_evaluationtype' => $r
|
||||
'accepted_evaluationtype' => $r,
|
||||
];
|
||||
}
|
||||
|
||||
|
@@ -13,7 +13,6 @@ namespace Chill\PersonBundle\Tests\Export\Filter\EvaluationFilters;
|
||||
|
||||
use Chill\MainBundle\Test\Export\AbstractFilterTest;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Entity\SocialWork\Evaluation;
|
||||
use Chill\PersonBundle\Export\Filter\EvaluationFilters\MaxDateFilter;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
@@ -40,8 +39,8 @@ final class MaxDateFilterTest extends AbstractFilterTest
|
||||
public function getFormData(): array
|
||||
{
|
||||
return [
|
||||
['maxdate' => false ],
|
||||
['maxdate' => true ]
|
||||
['maxdate' => false],
|
||||
['maxdate' => true],
|
||||
];
|
||||
}
|
||||
|
||||
|
@@ -15,6 +15,7 @@ use Chill\MainBundle\Test\Export\AbstractFilterTest;
|
||||
use Chill\PersonBundle\Entity\Household\Household;
|
||||
use Chill\PersonBundle\Entity\Household\HouseholdCompositionType;
|
||||
use Chill\PersonBundle\Export\Filter\HouseholdFilters\CompositionFilter;
|
||||
use DateTime;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
@@ -52,7 +53,7 @@ final class CompositionFilterTest extends AbstractFilterTest
|
||||
foreach ($array as $r) {
|
||||
$data[] = [
|
||||
'accepted_composition' => $r,
|
||||
'on_date' => \DateTime::createFromFormat('Y-m-d', '2022-05-01'),
|
||||
'on_date' => DateTime::createFromFormat('Y-m-d', '2022-05-01'),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -73,4 +74,4 @@ final class CompositionFilterTest extends AbstractFilterTest
|
||||
->from(Household::class, 'h'),
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -13,6 +13,7 @@ namespace Chill\PersonBundle\Tests\Export\Filter\PersonFilters;
|
||||
|
||||
use Chill\MainBundle\Test\Export\AbstractFilterTest;
|
||||
use Chill\PersonBundle\Export\Filter\PersonFilters\AccompanyingPeriodClosingFilter;
|
||||
use DateTime;
|
||||
use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
|
||||
|
||||
/**
|
||||
@@ -43,8 +44,8 @@ final class AccompanyingPeriodClosingFilterTest extends AbstractFilterTest
|
||||
{
|
||||
return [
|
||||
[
|
||||
'date_from' => \DateTime::createFromFormat('Y-m-d', '2000-01-01'),
|
||||
'date_to' => \DateTime::createFromFormat('Y-m-d', '2010-01-01'),
|
||||
'date_from' => DateTime::createFromFormat('Y-m-d', '2000-01-01'),
|
||||
'date_to' => DateTime::createFromFormat('Y-m-d', '2010-01-01'),
|
||||
],
|
||||
];
|
||||
}
|
||||
@@ -86,4 +87,4 @@ final class AccompanyingPeriodClosingFilterTest extends AbstractFilterTest
|
||||
->join('person.center', 'center'),
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -13,6 +13,7 @@ namespace Chill\PersonBundle\Tests\Export\Filter\PersonFilters;
|
||||
|
||||
use Chill\MainBundle\Test\Export\AbstractFilterTest;
|
||||
use Chill\PersonBundle\Export\Filter\PersonFilters\AccompanyingPeriodOpeningFilter;
|
||||
use DateTime;
|
||||
use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
|
||||
|
||||
/**
|
||||
@@ -43,8 +44,8 @@ final class AccompanyingPeriodOpeningFilterTest extends AbstractFilterTest
|
||||
{
|
||||
return [
|
||||
[
|
||||
'date_from' => \DateTime::createFromFormat('Y-m-d', '2000-01-01'),
|
||||
'date_to' => \DateTime::createFromFormat('Y-m-d', '2010-01-01'),
|
||||
'date_from' => DateTime::createFromFormat('Y-m-d', '2000-01-01'),
|
||||
'date_to' => DateTime::createFromFormat('Y-m-d', '2010-01-01'),
|
||||
],
|
||||
];
|
||||
}
|
||||
@@ -86,4 +87,4 @@ final class AccompanyingPeriodOpeningFilterTest extends AbstractFilterTest
|
||||
->join('person.center', 'center'),
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -14,6 +14,7 @@ namespace Chill\PersonBundle\Tests\Export\Filter\PersonFilters;
|
||||
use Chill\MainBundle\Test\Export\AbstractFilterTest;
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
use Chill\PersonBundle\Export\Filter\PersonFilters\AgeFilter;
|
||||
use DateTime;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
@@ -42,12 +43,12 @@ final class AgeFilterTest extends AbstractFilterTest
|
||||
[
|
||||
'min_age' => '18',
|
||||
'max_age' => '60',
|
||||
'date_calc' => \DateTime::createFromFormat('Y-m-d', '2020-05-01'),
|
||||
'date_calc' => DateTime::createFromFormat('Y-m-d', '2020-05-01'),
|
||||
],
|
||||
[ // ça devrait faire boum !
|
||||
'min_age' => '35',
|
||||
'max_age' => '30',
|
||||
'date_calc' => \DateTime::createFromFormat('Y-m-d', '2020-05-01'),
|
||||
'date_calc' => DateTime::createFromFormat('Y-m-d', '2020-05-01'),
|
||||
],
|
||||
];
|
||||
}
|
||||
|
@@ -14,6 +14,7 @@ namespace Chill\PersonBundle\Tests\Export\Filter\PersonFilters;
|
||||
use Chill\MainBundle\Test\Export\AbstractFilterTest;
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
use Chill\PersonBundle\Export\Filter\PersonFilters\DeadOrAliveFilter;
|
||||
use DateTime;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
@@ -41,11 +42,11 @@ final class DeadOrAliveFilterTest extends AbstractFilterTest
|
||||
return [
|
||||
[
|
||||
'person_state' => 'alive',
|
||||
'date_calc' => \DateTime::createFromFormat('Y-m-d', '2021-05-01'),
|
||||
'date_calc' => DateTime::createFromFormat('Y-m-d', '2021-05-01'),
|
||||
],
|
||||
[
|
||||
'person_state' => 'deceased',
|
||||
'date_calc' => \DateTime::createFromFormat('Y-m-d', '2021-05-01'),
|
||||
'date_calc' => DateTime::createFromFormat('Y-m-d', '2021-05-01'),
|
||||
],
|
||||
];
|
||||
}
|
||||
@@ -64,4 +65,4 @@ final class DeadOrAliveFilterTest extends AbstractFilterTest
|
||||
->from(Person::class, 'p'),
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -14,6 +14,7 @@ namespace Chill\PersonBundle\Tests\Export\Filter\PersonFilters;
|
||||
use Chill\MainBundle\Test\Export\AbstractFilterTest;
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
use Chill\PersonBundle\Export\Filter\PersonFilters\DeathdateFilter;
|
||||
use DateTime;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
@@ -40,9 +41,9 @@ final class DeathdateFilterTest extends AbstractFilterTest
|
||||
{
|
||||
return [
|
||||
[
|
||||
'date_from' => \DateTime::createFromFormat('Y-m-d', '2020-05-01'),
|
||||
'date_to' => \DateTime::createFromFormat('Y-m-d', '2022-05-01'),
|
||||
]
|
||||
'date_from' => DateTime::createFromFormat('Y-m-d', '2020-05-01'),
|
||||
'date_to' => DateTime::createFromFormat('Y-m-d', '2022-05-01'),
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
@@ -60,4 +61,4 @@ final class DeathdateFilterTest extends AbstractFilterTest
|
||||
->from(Person::class, 'p'),
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -15,6 +15,7 @@ use Chill\MainBundle\Test\Export\AbstractFilterTest;
|
||||
use Chill\PersonBundle\Entity\MaritalStatus;
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
use Chill\PersonBundle\Export\Filter\PersonFilters\MaritalStatusFilter;
|
||||
use DateTime;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
@@ -52,7 +53,7 @@ final class MaritalStatusFilterTest extends AbstractFilterTest
|
||||
foreach ($array as $m) {
|
||||
$data[] = [
|
||||
'maritalStatus' => $m,
|
||||
'calc_date' => \DateTime::createFromFormat('Y-m-d', '2022-05-01'),
|
||||
'calc_date' => DateTime::createFromFormat('Y-m-d', '2022-05-01'),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -74,4 +75,3 @@ final class MaritalStatusFilterTest extends AbstractFilterTest
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -47,7 +47,7 @@ final class NationalityFilterTest extends AbstractFilterTest
|
||||
|
||||
foreach ($countries as $c) {
|
||||
$data[] = [
|
||||
'nationalities' => $c
|
||||
'nationalities' => $c,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -68,5 +68,4 @@ final class NationalityFilterTest extends AbstractFilterTest
|
||||
->from(Person::class, 'p'),
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -16,6 +16,7 @@ use Chill\PersonBundle\Entity\Person;
|
||||
use Chill\PersonBundle\Entity\Person\ResidentialAddress;
|
||||
use Chill\PersonBundle\Export\Filter\PersonFilters\ResidentialAddressAtThirdpartyFilter;
|
||||
use Chill\ThirdPartyBundle\Entity\ThirdPartyCategory;
|
||||
use DateTime;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\ORM\Query\Expr;
|
||||
|
||||
@@ -54,7 +55,7 @@ final class ResidentialAddressAtThirdpartyFilterTest extends AbstractFilterTest
|
||||
foreach ($array as $r) {
|
||||
$data[] = [
|
||||
'thirdparty_cat' => $r,
|
||||
'date_calc' => \DateTime::createFromFormat('Y-m-d', '2022-05-01'),
|
||||
'date_calc' => DateTime::createFromFormat('Y-m-d', '2022-05-01'),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -76,8 +77,7 @@ final class ResidentialAddressAtThirdpartyFilterTest extends AbstractFilterTest
|
||||
->join(ResidentialAddress::class, 'resaddr', Expr\Join::WITH, 'resaddr.person = p')
|
||||
->join('p.center', 'center')
|
||||
->join('resaddr.hostThirdParty', 'tparty')
|
||||
->join('tparty.categories', 'tpartycat')
|
||||
,
|
||||
->join('tparty.categories', 'tpartycat'),
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -13,9 +13,7 @@ namespace Chill\PersonBundle\Tests\Export\Filter\PersonFilters;
|
||||
|
||||
use Chill\MainBundle\Test\Export\AbstractFilterTest;
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
use Chill\PersonBundle\Export\Filter\PersonFilters\ResidentialAddressAtThirdpartyFilter;
|
||||
use Chill\PersonBundle\Export\Filter\PersonFilters\ResidentialAddressAtUserFilter;
|
||||
use Chill\ThirdPartyBundle\Entity\ThirdPartyCategory;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\ORM\Query\Expr;
|
||||
|
||||
@@ -60,4 +58,4 @@ final class ResidentialAddressAtUserFilterTest extends AbstractFilterTest
|
||||
->join('p.center', 'center'),
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -47,9 +47,10 @@ final class ReferrerFilterTest extends AbstractFilterTest
|
||||
|
||||
foreach ($users as $u) {
|
||||
$data[] = [
|
||||
'accepted_agents' => $u
|
||||
'accepted_agents' => $u,
|
||||
];
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
@@ -68,4 +69,4 @@ final class ReferrerFilterTest extends AbstractFilterTest
|
||||
->join('acp.works', 'acpw'),
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -50,17 +50,21 @@ final class SocialWorkTypeFilterTest extends AbstractFilterTest
|
||||
$results = [];
|
||||
|
||||
$social_actions = $action_repository->findAll();
|
||||
|
||||
foreach ($social_actions as $action) {
|
||||
$actions[] = $action->getId();
|
||||
$goals_by_action = $goal_repository->findBySocialActionWithDescendants($action);
|
||||
|
||||
foreach ($goals_by_action as $goal) {
|
||||
$goals[] = $goal->getId();
|
||||
$results_by_goal = $result_repository->findByGoal($goal);
|
||||
|
||||
foreach ($results_by_goal as $result) {
|
||||
$results[] = $result->getId();
|
||||
}
|
||||
}
|
||||
$results_by_action = $result_repository->findBySocialActionWithDescendants($action);
|
||||
|
||||
foreach ($results_by_action as $result) {
|
||||
$results[] = $result->getId();
|
||||
}
|
||||
@@ -79,7 +83,7 @@ final class SocialWorkTypeFilterTest extends AbstractFilterTest
|
||||
'actionType' => implode(',', $actions),
|
||||
'goal' => implode(',', $goals),
|
||||
'result' => implode(',', $results),
|
||||
]
|
||||
],
|
||||
];
|
||||
/// TODO ne fonctionne pas
|
||||
var_dump($data);
|
||||
@@ -102,4 +106,4 @@ final class SocialWorkTypeFilterTest extends AbstractFilterTest
|
||||
->join('acp.works', 'acpw'),
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,5 +1,14 @@
|
||||
<?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\Repository;
|
||||
|
||||
use Chill\MainBundle\Entity\User;
|
||||
@@ -14,16 +23,21 @@ use Prophecy\Argument;
|
||||
use Prophecy\PhpUnit\ProphecyTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
use function count;
|
||||
|
||||
class PersonACLAwareRepositoryTest extends KernelTestCase
|
||||
/**
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
final class PersonACLAwareRepositoryTest extends KernelTestCase
|
||||
{
|
||||
use ProphecyTrait;
|
||||
|
||||
private EntityManagerInterface $entityManager;
|
||||
private CenterRepositoryInterface $centerRepository;
|
||||
|
||||
private CountryRepository $countryRepository;
|
||||
|
||||
private CenterRepositoryInterface $centerRepository;
|
||||
private EntityManagerInterface $entityManager;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
@@ -32,7 +46,6 @@ class PersonACLAwareRepositoryTest extends KernelTestCase
|
||||
$this->entityManager = self::$container->get(EntityManagerInterface::class);
|
||||
$this->countryRepository = self::$container->get(CountryRepository::class);
|
||||
$this->centerRepository = self::$container->get(CenterRepositoryInterface::class);
|
||||
|
||||
}
|
||||
|
||||
public function testCountByCriteria()
|
||||
@@ -46,8 +59,12 @@ class PersonACLAwareRepositoryTest extends KernelTestCase
|
||||
$security = $this->prophesize(Security::class);
|
||||
$security->getUser()->willReturn($user);
|
||||
|
||||
$repository = new PersonACLAwareRepository($security->reveal(), $this->entityManager, $this->countryRepository,
|
||||
$authorizationHelper->reveal());
|
||||
$repository = new PersonACLAwareRepository(
|
||||
$security->reveal(),
|
||||
$this->entityManager,
|
||||
$this->countryRepository,
|
||||
$authorizationHelper->reveal()
|
||||
);
|
||||
|
||||
$number = $repository->countBySearchCriteria('diallo');
|
||||
|
||||
@@ -65,13 +82,18 @@ class PersonACLAwareRepositoryTest extends KernelTestCase
|
||||
$security = $this->prophesize(Security::class);
|
||||
$security->getUser()->willReturn($user);
|
||||
|
||||
$repository = new PersonACLAwareRepository($security->reveal(), $this->entityManager, $this->countryRepository,
|
||||
$authorizationHelper->reveal());
|
||||
$repository = new PersonACLAwareRepository(
|
||||
$security->reveal(),
|
||||
$this->entityManager,
|
||||
$this->countryRepository,
|
||||
$authorizationHelper->reveal()
|
||||
);
|
||||
|
||||
$results = $repository->findBySearchCriteria(0, 5, false, 'diallo');
|
||||
|
||||
$this->assertGreaterThan(0, count($results));
|
||||
$this->assertContainsOnlyInstancesOf(Person::class, $results);
|
||||
|
||||
foreach ($results as $person) {
|
||||
$this->assertStringContainsString('diallo', strtolower($person->getFirstName() . ' ' . $person->getLastName()));
|
||||
}
|
||||
|
Reference in New Issue
Block a user