mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
tests: write a simple Export test for new indicators + fix depreciation with BrowserKit client
cfr: https://symfony.com/doc/4.4/components/browser_kit.html#creating-a-client
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace Export\Export;
|
||||
|
||||
use Chill\MainBundle\Test\Export\AbstractExportTest;
|
||||
use Chill\PersonBundle\Export\Declarations;
|
||||
use Chill\PersonBundle\Export\Export\CountAccompanyingCourse;
|
||||
|
||||
final class CountAccompanyingCourseTest extends AbstractExportTest
|
||||
{
|
||||
private CountAccompanyingCourse $export;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->export = self::$container->get('chill.person.export.count_accompanyingcourse');
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getExport()
|
||||
{
|
||||
return $this->export;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getFormData(): array
|
||||
{
|
||||
return [[]];
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getModifiersCombination()
|
||||
{
|
||||
return [[Declarations::ACP_TYPE]];
|
||||
}
|
||||
}
|
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace Export\Export;
|
||||
|
||||
use Chill\MainBundle\Test\Export\AbstractExportTest;
|
||||
use Chill\PersonBundle\Export\Declarations;
|
||||
use Chill\PersonBundle\Export\Export\StatAccompanyingCourseDuration;
|
||||
|
||||
final class StatAccompanyingCourseDurationTest extends AbstractExportTest
|
||||
{
|
||||
private StatAccompanyingCourseDuration $export;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->export = self::$container->get('chill.person.export.avg_accompanyingcourse_duration');
|
||||
}
|
||||
|
||||
public function getExport()
|
||||
{
|
||||
return $this->export;
|
||||
}
|
||||
|
||||
public function getFormData(): array
|
||||
{
|
||||
return [
|
||||
['closingdate' => \DateTime::createFromFormat('Y-m-d', '2022-06-30')],
|
||||
];
|
||||
}
|
||||
|
||||
public function getModifiersCombination()
|
||||
{
|
||||
return [[Declarations::ACP_TYPE]];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user