mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-08 15:54:59 +00:00
fix cs
This commit is contained in:
@@ -28,6 +28,24 @@ use PHPUnit\Framework\TestCase;
|
||||
*/
|
||||
final class DefaultRangeGeneratorTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @dataProvider generateData
|
||||
*/
|
||||
public function testGenerateRange(\DateTimeImmutable $date, ?\DateTimeImmutable $startDate, ?\DateTimeImmutable $endDate)
|
||||
{
|
||||
$generator = new DefaultRangeGenerator();
|
||||
|
||||
['startDate' => $actualStartDate, 'endDate' => $actualEndDate] = $generator->generateRange($date);
|
||||
|
||||
if (null === $startDate) {
|
||||
$this->assertNull($actualStartDate);
|
||||
$this->assertNull($actualEndDate);
|
||||
} else {
|
||||
$this->assertEquals($startDate->format(\DateTimeImmutable::ATOM), $actualStartDate->format(\DateTimeImmutable::ATOM));
|
||||
$this->assertEquals($endDate->format(\DateTimeImmutable::ATOM), $actualEndDate->format(\DateTimeImmutable::ATOM));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* * Lundi => Envoi des rdv du mardi et mercredi.
|
||||
* * Mardi => Envoi des rdv du jeudi.
|
||||
@@ -79,22 +97,4 @@ final class DefaultRangeGeneratorTest extends TestCase
|
||||
null,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider generateData
|
||||
*/
|
||||
public function testGenerateRange(\DateTimeImmutable $date, ?\DateTimeImmutable $startDate, ?\DateTimeImmutable $endDate)
|
||||
{
|
||||
$generator = new DefaultRangeGenerator();
|
||||
|
||||
['startDate' => $actualStartDate, 'endDate' => $actualEndDate] = $generator->generateRange($date);
|
||||
|
||||
if (null === $startDate) {
|
||||
$this->assertNull($actualStartDate);
|
||||
$this->assertNull($actualEndDate);
|
||||
} else {
|
||||
$this->assertEquals($startDate->format(\DateTimeImmutable::ATOM), $actualStartDate->format(\DateTimeImmutable::ATOM));
|
||||
$this->assertEquals($endDate->format(\DateTimeImmutable::ATOM), $actualEndDate->format(\DateTimeImmutable::ATOM));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user