if (\PHP_VERSION_ID >= 80200
) { yield ['last day of next month',
new PeriodicalTrigger(\DateInterval::
createFromDateString('last day of next month'
),
$from,
$until)];
} } /**
* @dataProvider providerGetNextRunDates
*/
public function testGetNextRunDates(\DateTimeImmutable
$from, TriggerInterface
$trigger, array
$expected, int
$count = 0
) { $this->
assertEquals($expected,
$this->
getNextRunDates($from,
$trigger,
$count ?? \
count($expected)));
} public static function providerGetNextRunDates(): iterable
{ yield [ new \
DateTimeImmutable('2023-03-19 13:45'
),
self::
createTrigger('next tuesday'
),
[ new \
DateTimeImmutable('2023-03-21 13:45:00'
),
new \
DateTimeImmutable('2023-03-28 13:45:00'
),
new \
DateTimeImmutable('2023-04-04 13:45:00'
),