Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 80b0826

Browse filesBrowse 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
Copy full SHA for 80b0826

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Scheduler/Tests/Trigger/PeriodicalTriggerTest.php
+2-2Lines changed: 2 additions & 2 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.