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:
2022-07-27 18:39:58 +02:00
parent 287d8f546b
commit b9186ed6e0
3 changed files with 83 additions and 2 deletions

View File

@@ -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]];
}
}

View File

@@ -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]];
}
}