mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +00:00
Add tests for new exports calendar
This commit is contained in:
parent
33235d3541
commit
e0de10b7a8
@ -0,0 +1,55 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Chill\CalendarBundle\Tests\Export\Export;
|
||||||
|
|
||||||
|
use Chill\CalendarBundle\Export\Declarations;
|
||||||
|
use Chill\CalendarBundle\Export\Export\LinkedToAcp\CountCalendars as CountCalendarsLinkedToAcp;
|
||||||
|
use Chill\CalendarBundle\Export\Export\LinkedToPerson\CountCalendars as CountCalendarsLinkedToPerson;
|
||||||
|
use Chill\CalendarBundle\Repository\CalendarRepository;
|
||||||
|
use Chill\MainBundle\Test\Export\AbstractExportTest;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @internal
|
||||||
|
*
|
||||||
|
* @coversNothing
|
||||||
|
*/
|
||||||
|
class CountCalendarsTest extends AbstractExportTest
|
||||||
|
{
|
||||||
|
protected function setUp(): void
|
||||||
|
{
|
||||||
|
self::bootKernel();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public function getExport()
|
||||||
|
{
|
||||||
|
$repository = self::$container->get(CalendarRepository::class);
|
||||||
|
|
||||||
|
yield new CountCalendarsLinkedToAcp($repository, $this->getParameters(true));
|
||||||
|
yield new CountCalendarsLinkedToAcp($repository, $this->getParameters(false));
|
||||||
|
|
||||||
|
yield new CountCalendarsLinkedToPerson($repository, $this->getParameters(true));
|
||||||
|
yield new CountCalendarsLinkedToPerson($repository, $this->getParameters(false));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public function getFormData()
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public function getModifiersCombination()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
[
|
||||||
|
Declarations::CALENDAR_TYPE,
|
||||||
|
]];
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,55 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Chill\CalendarBundle\Tests\Export\Export;
|
||||||
|
|
||||||
|
use Chill\CalendarBundle\Export\Declarations;
|
||||||
|
use Chill\CalendarBundle\Export\Export\LinkedToAcp\StatCalendarAvgDuration as StatCalendarAvgDurationLinkedToAcp;
|
||||||
|
use Chill\CalendarBundle\Export\Export\LinkedToPerson\StatCalendarAvgDuration as StatCalendarAvgDurationLinkedToPerson;
|
||||||
|
use Chill\CalendarBundle\Repository\CalendarRepository;
|
||||||
|
use Chill\MainBundle\Test\Export\AbstractExportTest;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @internal
|
||||||
|
*
|
||||||
|
* @coversNothing
|
||||||
|
*/
|
||||||
|
class StatCalendarAvgDurationTest extends AbstractExportTest
|
||||||
|
{
|
||||||
|
protected function setUp(): void
|
||||||
|
{
|
||||||
|
self::bootKernel();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public function getExport()
|
||||||
|
{
|
||||||
|
$repository = self::$container->get(CalendarRepository::class);
|
||||||
|
|
||||||
|
yield new StatCalendarAvgDurationLinkedToAcp($repository, $this->getParameters(true));
|
||||||
|
yield new StatCalendarAvgDurationLinkedToAcp($repository, $this->getParameters(false));
|
||||||
|
|
||||||
|
yield new StatCalendarAvgDurationLinkedToPerson($repository, $this->getParameters(true));
|
||||||
|
yield new StatCalendarAvgDurationLinkedToPerson($repository, $this->getParameters(false));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public function getFormData()
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public function getModifiersCombination()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
[
|
||||||
|
Declarations::CALENDAR_TYPE,
|
||||||
|
]];
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,55 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Chill\CalendarBundle\Tests\Export\Export;
|
||||||
|
|
||||||
|
use Chill\CalendarBundle\Export\Declarations;
|
||||||
|
use Chill\CalendarBundle\Export\Export\LinkedToAcp\StatCalendarSumDuration as StatCalendarSumDurationLinkedToAcp;
|
||||||
|
use Chill\CalendarBundle\Export\Export\LinkedToPerson\StatCalendarSumDuration as StatCalendarSumDurationLinkedToPerson;
|
||||||
|
use Chill\CalendarBundle\Repository\CalendarRepository;
|
||||||
|
use Chill\MainBundle\Test\Export\AbstractExportTest;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @internal
|
||||||
|
*
|
||||||
|
* @coversNothing
|
||||||
|
*/
|
||||||
|
class StatCalendarSumDurationTest extends AbstractExportTest
|
||||||
|
{
|
||||||
|
protected function setUp(): void
|
||||||
|
{
|
||||||
|
self::bootKernel();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public function getExport()
|
||||||
|
{
|
||||||
|
$repository = self::$container->get(CalendarRepository::class);
|
||||||
|
|
||||||
|
yield new StatCalendarSumDurationLinkedToAcp($repository, $this->getParameters(true));
|
||||||
|
yield new StatCalendarSumDurationLinkedToAcp($repository, $this->getParameters(false));
|
||||||
|
|
||||||
|
yield new StatCalendarSumDurationLinkedToPerson($repository, $this->getParameters(true));
|
||||||
|
yield new StatCalendarSumDurationLinkedToPerson($repository, $this->getParameters(false));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public function getFormData()
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public function getModifiersCombination()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
[
|
||||||
|
Declarations::CALENDAR_TYPE,
|
||||||
|
]];
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user