mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-07 23:34:58 +00:00
fix cs
This commit is contained in:
@@ -29,37 +29,6 @@ final class RollingDateConverterTest extends TestCase
|
||||
$this->converter = new RollingDateConverter();
|
||||
}
|
||||
|
||||
public static function generateDataConversionDate(): iterable
|
||||
{
|
||||
$format = 'Y-m-d His';
|
||||
|
||||
yield [RollingDate::T_MONTH_CURRENT_START, '2022-11-01 000000', $format];
|
||||
|
||||
yield [RollingDate::T_MONTH_NEXT_START, '2022-12-01 000000', $format];
|
||||
|
||||
yield [RollingDate::T_MONTH_PREVIOUS_START, '2022-10-01 000000', $format];
|
||||
|
||||
yield [RollingDate::T_QUARTER_CURRENT_START, '2022-10-01 000000', $format];
|
||||
|
||||
yield [RollingDate::T_QUARTER_NEXT_START, '2023-01-01 000000', $format];
|
||||
|
||||
yield [RollingDate::T_QUARTER_PREVIOUS_START, '2022-07-01 000000', $format];
|
||||
|
||||
yield [RollingDate::T_TODAY, '2022-11-07 000000', $format];
|
||||
|
||||
yield [RollingDate::T_WEEK_CURRENT_START, '2022-11-07 000000', $format];
|
||||
|
||||
yield [RollingDate::T_WEEK_NEXT_START, '2022-11-14 000000', $format];
|
||||
|
||||
yield [RollingDate::T_WEEK_PREVIOUS_START, '2022-10-31 000000', $format];
|
||||
|
||||
yield [RollingDate::T_YEAR_CURRENT_START, '2022-01-01 000000', $format];
|
||||
|
||||
yield [RollingDate::T_YEAR_NEXT_START, '2023-01-01 000000', $format];
|
||||
|
||||
yield [RollingDate::T_YEAR_PREVIOUS_START, '2021-01-01 000000', $format];
|
||||
}
|
||||
|
||||
public function testConversionFixedDate()
|
||||
{
|
||||
$rollingDate = new RollingDate(RollingDate::T_FIXED_DATE, new \DateTimeImmutable('2022-01-01'));
|
||||
@@ -97,4 +66,35 @@ final class RollingDateConverterTest extends TestCase
|
||||
$this->converter->convert($rollingDate)
|
||||
);
|
||||
}
|
||||
|
||||
public static function generateDataConversionDate(): iterable
|
||||
{
|
||||
$format = 'Y-m-d His';
|
||||
|
||||
yield [RollingDate::T_MONTH_CURRENT_START, '2022-11-01 000000', $format];
|
||||
|
||||
yield [RollingDate::T_MONTH_NEXT_START, '2022-12-01 000000', $format];
|
||||
|
||||
yield [RollingDate::T_MONTH_PREVIOUS_START, '2022-10-01 000000', $format];
|
||||
|
||||
yield [RollingDate::T_QUARTER_CURRENT_START, '2022-10-01 000000', $format];
|
||||
|
||||
yield [RollingDate::T_QUARTER_NEXT_START, '2023-01-01 000000', $format];
|
||||
|
||||
yield [RollingDate::T_QUARTER_PREVIOUS_START, '2022-07-01 000000', $format];
|
||||
|
||||
yield [RollingDate::T_TODAY, '2022-11-07 000000', $format];
|
||||
|
||||
yield [RollingDate::T_WEEK_CURRENT_START, '2022-11-07 000000', $format];
|
||||
|
||||
yield [RollingDate::T_WEEK_NEXT_START, '2022-11-14 000000', $format];
|
||||
|
||||
yield [RollingDate::T_WEEK_PREVIOUS_START, '2022-10-31 000000', $format];
|
||||
|
||||
yield [RollingDate::T_YEAR_CURRENT_START, '2022-01-01 000000', $format];
|
||||
|
||||
yield [RollingDate::T_YEAR_NEXT_START, '2023-01-01 000000', $format];
|
||||
|
||||
yield [RollingDate::T_YEAR_PREVIOUS_START, '2021-01-01 000000', $format];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user