Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 02ff4c6

Browse files
committed
minor #53337 [Form] make sure that the submitted year is an accepted choice (xabbuh)
This PR was merged into the 5.4 branch. Discussion ---------- [Form] make sure that the submitted year is an accepted choice | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT Commits ------- 64f675c make sure that the submitted year is an accepted choice
2 parents 37282f7 + 64f675c commit 02ff4c6

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,7 @@ public function testSubmitNullUsesDateEmptyData($widget, $emptyData, $expectedDa
695695
$form = $this->factory->create(static::TESTED_TYPE, null, [
696696
'widget' => $widget,
697697
'empty_data' => $emptyData,
698+
'years' => range(2018, (int) date('Y')),
698699
]);
699700
$form->submit(null);
700701

src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,6 +1064,7 @@ public function testSubmitNullUsesDateEmptyData($widget, $emptyData, $expectedDa
10641064
$form = $this->factory->create(static::TESTED_TYPE, null, [
10651065
'widget' => $widget,
10661066
'empty_data' => $emptyData,
1067+
'years' => range(2018, (int) date('Y')),
10671068
]);
10681069
$form->submit(null);
10691070

0 commit comments

Comments
 (0)