Skip to content

Commit 80b0826

Browse files
committed
minor #59125 [Scheduler] Fix optional $count variable in testGetNextRunDates (codedmonkey)
This PR was merged into the 6.4 branch. Discussion ---------- [Scheduler] Fix optional `$count` variable in `testGetNextRunDates` | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | yes (in tests) | New feature? | no | Deprecations? | no | Issues | N/A | License | MIT Fixes a weird side effect of the optional `$count` variable in `testGetNextRunDates`, because it uses the Null Coalescing Operator it was always expecting 0 iterations if not passing a value from the provider. It doesn't need to be optional because it's always passed from the provider so we could just make it a required variable. Commits ------- d8fa076 [Scheduler] Fix optional count variable in testGetNextRunDates
2 parents d7b653b + d8fa076 commit 80b0826

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/Scheduler/Tests/Trigger/PeriodicalTriggerTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ public static function provideForToString()
108108
/**
109109
* @dataProvider providerGetNextRunDates
110110
*/
111-
public function testGetNextRunDates(\DateTimeImmutable $from, TriggerInterface $trigger, array $expected, int $count = 0)
111+
public function testGetNextRunDates(\DateTimeImmutable $from, TriggerInterface $trigger, array $expected, int $count)
112112
{
113-
$this->assertEquals($expected, $this->getNextRunDates($from, $trigger, $count ?? \count($expected)));
113+
$this->assertEquals($expected, $this->getNextRunDates($from, $trigger, $count));
114114
}
115115

116116
public static function providerGetNextRunDates(): iterable

0 commit comments

Comments
 (0)