mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-08 07:44:59 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -19,12 +19,11 @@ declare(strict_types=1);
|
||||
namespace Chill\CalendarBundle\Tests\Service\ShortMessageNotification;
|
||||
|
||||
use Chill\CalendarBundle\Service\ShortMessageNotification\DefaultRangeGenerator;
|
||||
use DateTimeImmutable;
|
||||
use Iterator;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class DefaultRangeGeneratorTest extends TestCase
|
||||
@@ -36,46 +35,46 @@ final class DefaultRangeGeneratorTest extends TestCase
|
||||
* * Jeudi => envoi des rdv du samedi et dimanche
|
||||
* * Vendredi => Envoi des rdv du lundi.
|
||||
*/
|
||||
public function generateData(): Iterator
|
||||
public function generateData(): \Iterator
|
||||
{
|
||||
yield [
|
||||
new DateTimeImmutable('2022-06-13 10:45:00'),
|
||||
new DateTimeImmutable('2022-06-14 00:00:00'),
|
||||
new DateTimeImmutable('2022-06-16 00:00:00'),
|
||||
new \DateTimeImmutable('2022-06-13 10:45:00'),
|
||||
new \DateTimeImmutable('2022-06-14 00:00:00'),
|
||||
new \DateTimeImmutable('2022-06-16 00:00:00'),
|
||||
];
|
||||
|
||||
yield [
|
||||
new DateTimeImmutable('2022-06-14 15:45:00'),
|
||||
new DateTimeImmutable('2022-06-16 00:00:00'),
|
||||
new DateTimeImmutable('2022-06-17 00:00:00'),
|
||||
new \DateTimeImmutable('2022-06-14 15:45:00'),
|
||||
new \DateTimeImmutable('2022-06-16 00:00:00'),
|
||||
new \DateTimeImmutable('2022-06-17 00:00:00'),
|
||||
];
|
||||
|
||||
yield [
|
||||
new DateTimeImmutable('2022-06-15 13:45:18'),
|
||||
new DateTimeImmutable('2022-06-17 00:00:00'),
|
||||
new DateTimeImmutable('2022-06-18 00:00:00'),
|
||||
new \DateTimeImmutable('2022-06-15 13:45:18'),
|
||||
new \DateTimeImmutable('2022-06-17 00:00:00'),
|
||||
new \DateTimeImmutable('2022-06-18 00:00:00'),
|
||||
];
|
||||
|
||||
yield [
|
||||
new DateTimeImmutable('2022-06-16 01:30:55'),
|
||||
new DateTimeImmutable('2022-06-18 00:00:00'),
|
||||
new DateTimeImmutable('2022-06-20 00:00:00'),
|
||||
new \DateTimeImmutable('2022-06-16 01:30:55'),
|
||||
new \DateTimeImmutable('2022-06-18 00:00:00'),
|
||||
new \DateTimeImmutable('2022-06-20 00:00:00'),
|
||||
];
|
||||
|
||||
yield [
|
||||
new DateTimeImmutable('2022-06-17 21:30:55'),
|
||||
new DateTimeImmutable('2022-06-20 00:00:00'),
|
||||
new DateTimeImmutable('2022-06-21 00:00:00'),
|
||||
new \DateTimeImmutable('2022-06-17 21:30:55'),
|
||||
new \DateTimeImmutable('2022-06-20 00:00:00'),
|
||||
new \DateTimeImmutable('2022-06-21 00:00:00'),
|
||||
];
|
||||
|
||||
yield [
|
||||
new DateTimeImmutable('2022-06-18 21:30:55'),
|
||||
new \DateTimeImmutable('2022-06-18 21:30:55'),
|
||||
null,
|
||||
null,
|
||||
];
|
||||
|
||||
yield [
|
||||
new DateTimeImmutable('2022-06-19 21:30:55'),
|
||||
new \DateTimeImmutable('2022-06-19 21:30:55'),
|
||||
null,
|
||||
null,
|
||||
];
|
||||
@@ -84,7 +83,7 @@ final class DefaultRangeGeneratorTest extends TestCase
|
||||
/**
|
||||
* @dataProvider generateData
|
||||
*/
|
||||
public function testGenerateRange(DateTimeImmutable $date, ?DateTimeImmutable $startDate, ?DateTimeImmutable $endDate)
|
||||
public function testGenerateRange(\DateTimeImmutable $date, ?\DateTimeImmutable $startDate, ?\DateTimeImmutable $endDate)
|
||||
{
|
||||
$generator = new DefaultRangeGenerator();
|
||||
|
||||
@@ -94,8 +93,8 @@ final class DefaultRangeGeneratorTest extends TestCase
|
||||
$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));
|
||||
$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