[Form] fixed DateTimeType tests using "date_widget"="choice". #17248
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As said in the documentation, the default years available in the
DateType
go from five year before to five year after the current year. So now that it's 2016 all around, the tests which use the"date_widget"="choice"
without defining a"years"
option and tries to submit a date in 2010 are failing because 2010 is not in the default choice list.This PR fixes the issue by setting the
"years"
option to"2010"
for each test that need it. It also remove unnecessary (and confusing) dummy data from some tests which were suffering the same issue but silently.Edit : The PHP 5.6 build on travis seems to fetch and run some old version of the tests. So it still fail on this build but not on the others anymore.