mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
fix tests implementing AbstractAggregatorTest
This commit is contained in:
@@ -45,9 +45,7 @@ final class BySocialActionAggregatorTest extends AbstractAggregatorTest
|
||||
|
||||
public function getQueryBuilders(): array
|
||||
{
|
||||
if (null === self::$kernel) {
|
||||
self::bootKernel();
|
||||
}
|
||||
self::bootKernel();
|
||||
|
||||
$em = self::$container->get(EntityManagerInterface::class);
|
||||
|
||||
@@ -55,8 +53,8 @@ final class BySocialActionAggregatorTest extends AbstractAggregatorTest
|
||||
$em->createQueryBuilder()
|
||||
->select('count(activity.id)')
|
||||
->from(Activity::class, 'activity')
|
||||
->join('activity.accompanyingPeriod', 'acp')
|
||||
->join('activity.socialActions', 'actsocialaction'),
|
||||
->leftJoin('activity.accompanyingPeriod', 'acp')
|
||||
->leftJoin('activity.socialActions', 'actsocialaction'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -45,18 +45,16 @@ final class BySocialIssueAggregatorTest extends AbstractAggregatorTest
|
||||
|
||||
public function getQueryBuilders(): array
|
||||
{
|
||||
if (null === self::$kernel) {
|
||||
self::bootKernel();
|
||||
}
|
||||
self::bootKernel();
|
||||
|
||||
$em = self::$container->get(EntityManagerInterface::class);
|
||||
|
||||
return [
|
||||
$em->createQueryBuilder()
|
||||
->select('count(activity.id)')
|
||||
->select('count(activity)')
|
||||
->from(Activity::class, 'activity')
|
||||
->join('activity.accompanyingPeriod', 'acp')
|
||||
->join('activity.socialIssues', 'actsocialissue'),
|
||||
->leftJoin('activity.accompanyingPeriod', 'acp')
|
||||
->leftJoin('activity.socialIssues', 'actsocialissue'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -45,9 +45,7 @@ final class ByThirdpartyAggregatorTest extends AbstractAggregatorTest
|
||||
|
||||
public function getQueryBuilders(): array
|
||||
{
|
||||
if (null === self::$kernel) {
|
||||
self::bootKernel();
|
||||
}
|
||||
self::bootKernel();
|
||||
|
||||
$em = self::$container->get(EntityManagerInterface::class);
|
||||
|
||||
@@ -55,8 +53,8 @@ final class ByThirdpartyAggregatorTest extends AbstractAggregatorTest
|
||||
$em->createQueryBuilder()
|
||||
->select('count(activity.id)')
|
||||
->from(Activity::class, 'activity')
|
||||
->join('activity.accompanyingPeriod', 'acp')
|
||||
->join('activity.thirdParties', 'acttparty'),
|
||||
->leftJoin('activity.accompanyingPeriod', 'acp')
|
||||
->leftJoin('activity.thirdParties', 'acttparty'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -28,7 +28,7 @@ final class ByUserAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::$container->get('chill.activity.export.byuser_aggregator');
|
||||
$this->aggregator = self::$container->get(ByCreatorAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator()
|
||||
@@ -45,9 +45,7 @@ final class ByUserAggregatorTest extends AbstractAggregatorTest
|
||||
|
||||
public function getQueryBuilders(): array
|
||||
{
|
||||
if (null === self::$kernel) {
|
||||
self::bootKernel();
|
||||
}
|
||||
self::bootKernel();
|
||||
|
||||
$em = self::$container->get(EntityManagerInterface::class);
|
||||
|
||||
@@ -55,8 +53,8 @@ final class ByUserAggregatorTest extends AbstractAggregatorTest
|
||||
$em->createQueryBuilder()
|
||||
->select('count(activity.id)')
|
||||
->from(Activity::class, 'activity')
|
||||
->join('activity.accompanyingPeriod', 'acp')
|
||||
->join('activity.users', 'actusers'),
|
||||
->leftJoin('activity.accompanyingPeriod', 'acp')
|
||||
->leftJoin('activity.users', 'actusers'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -53,9 +53,7 @@ final class DateAggregatorTest extends AbstractAggregatorTest
|
||||
|
||||
public function getQueryBuilders(): array
|
||||
{
|
||||
if (null === self::$kernel) {
|
||||
self::bootKernel();
|
||||
}
|
||||
self::bootKernel();
|
||||
|
||||
$em = self::$container->get(EntityManagerInterface::class);
|
||||
|
||||
@@ -63,7 +61,7 @@ final class DateAggregatorTest extends AbstractAggregatorTest
|
||||
$em->createQueryBuilder()
|
||||
->select('count(activity.id)')
|
||||
->from(Activity::class, 'activity')
|
||||
->join('activity.accompanyingPeriod', 'acp'),
|
||||
->leftJoin('activity.accompanyingPeriod', 'acp'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -45,9 +45,7 @@ final class LocationTypeAggregatorTest extends AbstractAggregatorTest
|
||||
|
||||
public function getQueryBuilders(): array
|
||||
{
|
||||
if (null === self::$kernel) {
|
||||
self::bootKernel();
|
||||
}
|
||||
self::bootKernel();
|
||||
|
||||
$em = self::$container->get(EntityManagerInterface::class);
|
||||
|
||||
@@ -55,8 +53,8 @@ final class LocationTypeAggregatorTest extends AbstractAggregatorTest
|
||||
$em->createQueryBuilder()
|
||||
->select('count(activity.id)')
|
||||
->from(Activity::class, 'activity')
|
||||
->join('activity.accompanyingPeriod', 'acp')
|
||||
->join('activity.location', 'actloc'),
|
||||
->leftJoin('activity.accompanyingPeriod', 'acp')
|
||||
->leftJoin('activity.location', 'actloc'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -28,7 +28,7 @@ final class UserScopeAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::$container->get('chill.activity.export.userscope_aggregator');
|
||||
$this->aggregator = self::$container->get(CreatorScopeAggregator::class);
|
||||
}
|
||||
|
||||
public function getAggregator()
|
||||
@@ -45,9 +45,7 @@ final class UserScopeAggregatorTest extends AbstractAggregatorTest
|
||||
|
||||
public function getQueryBuilders(): array
|
||||
{
|
||||
if (null === self::$kernel) {
|
||||
self::bootKernel();
|
||||
}
|
||||
self::bootKernel();
|
||||
|
||||
$em = self::$container->get(EntityManagerInterface::class);
|
||||
|
||||
@@ -55,8 +53,8 @@ final class UserScopeAggregatorTest extends AbstractAggregatorTest
|
||||
$em->createQueryBuilder()
|
||||
->select('count(activity.id)')
|
||||
->from(Activity::class, 'activity')
|
||||
->join('activity.accompanyingPeriod', 'acp')
|
||||
->join('activity.user', 'actuser'),
|
||||
->leftJoin('activity.accompanyingPeriod', 'acp')
|
||||
->leftJoin('activity.user', 'actuser'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -11,6 +11,8 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\ActivityBundle\Tests\Export\Aggregator;
|
||||
|
||||
use Chill\ActivityBundle\Entity\Activity;
|
||||
use Chill\ActivityBundle\Entity\ActivityType;
|
||||
use Chill\ActivityBundle\Export\Aggregator\ActivityTypeAggregator;
|
||||
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
@@ -32,7 +34,7 @@ final class ActivityTypeAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::$container->get('chill.activity.export.type_aggregator');
|
||||
$this->aggregator = self::$container->get(ActivityTypeAggregator::class);
|
||||
|
||||
$request = $this->prophesize()
|
||||
->willExtend(\Symfony\Component\HttpFoundation\Request::class);
|
||||
@@ -57,19 +59,17 @@ final class ActivityTypeAggregatorTest extends AbstractAggregatorTest
|
||||
|
||||
public function getQueryBuilders()
|
||||
{
|
||||
if (null === self::$kernel) {
|
||||
self::bootKernel();
|
||||
}
|
||||
self::bootKernel();
|
||||
|
||||
$em = self::$container->get(EntityManagerInterface::class);
|
||||
|
||||
return [
|
||||
$em->createQueryBuilder()
|
||||
->select('count(activity.id)')
|
||||
->from('ChillActivityBundle:Activity', 'activity'),
|
||||
->from(Activity::class, 'activity'),
|
||||
$em->createQueryBuilder()
|
||||
->select('count(activity.id)')
|
||||
->from('ChillActivityBundle:Activity', 'activity')
|
||||
->from(Activity::class, 'activity')
|
||||
->join('activity.activityType', 'acttype'),
|
||||
];
|
||||
}
|
||||
|
@@ -11,6 +11,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\ActivityBundle\Tests\Export\Aggregator;
|
||||
|
||||
use Chill\ActivityBundle\Entity\Activity;
|
||||
use Chill\ActivityBundle\Export\Aggregator\ActivityUserAggregator;
|
||||
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
@@ -57,16 +58,14 @@ final class ActivityUserAggregatorTest extends AbstractAggregatorTest
|
||||
|
||||
public function getQueryBuilders(): array
|
||||
{
|
||||
if (null === self::$kernel) {
|
||||
self::bootKernel();
|
||||
}
|
||||
self::bootKernel();
|
||||
|
||||
$em = self::$container->get(EntityManagerInterface::class);
|
||||
|
||||
return [
|
||||
$em->createQueryBuilder()
|
||||
->select('count(activity.id)')
|
||||
->from('ChillActivityBundle:Activity', 'activity'),
|
||||
->from(Activity::class, 'activity'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -11,6 +11,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\ActivityBundle\Tests\Export\Aggregator\PersonAggregators;
|
||||
|
||||
use Chill\ActivityBundle\Entity\Activity;
|
||||
use Chill\ActivityBundle\Export\Aggregator\PersonAggregators\ActivityReasonAggregator;
|
||||
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
@@ -30,7 +31,7 @@ final class ActivityReasonAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::$container->get('chill.activity.export.reason_aggregator');
|
||||
$this->aggregator = self::$container->get(ActivityReasonAggregator::class);
|
||||
|
||||
$request = $this->prophesize()
|
||||
->willExtend(\Symfony\Component\HttpFoundation\Request::class);
|
||||
@@ -56,23 +57,21 @@ final class ActivityReasonAggregatorTest extends AbstractAggregatorTest
|
||||
|
||||
public function getQueryBuilders(): array
|
||||
{
|
||||
if (null === self::$kernel) {
|
||||
self::bootKernel();
|
||||
}
|
||||
self::bootKernel();
|
||||
|
||||
$em = self::$container->get(EntityManagerInterface::class);
|
||||
|
||||
return [
|
||||
$em->createQueryBuilder()
|
||||
->select('count(activity.id)')
|
||||
->from('ChillActivityBundle:Activity', 'activity'),
|
||||
->from(Activity::class, 'activity'),
|
||||
$em->createQueryBuilder()
|
||||
->select('count(activity.id)')
|
||||
->from('ChillActivityBundle:Activity', 'activity')
|
||||
->from(Activity::class, 'activity')
|
||||
->join('activity.reasons', 'actreasons'),
|
||||
$em->createQueryBuilder()
|
||||
->select('count(activity.id)')
|
||||
->from('ChillActivityBundle:Activity', 'activity')
|
||||
->from(Activity::class, 'activity')
|
||||
->join('activity.reasons', 'actreasons')
|
||||
->join('actreasons.category', 'actreasoncat'),
|
||||
];
|
||||
|
Reference in New Issue
Block a user