As a follow-up to #2820490: FormatDate process plugin, we should add testing to validate_format when it is FALSE.
The setting we are talking about handles this:
// Functions that parse date is forgiving, it might create a date that
// is not exactly a match for the provided value, so test for that by
// re-creating the date/time formatted string and comparing it to the input. For
// instance, an input value of '11' using a format of Y (4 digits) gets
// created as '0011' instead of '2011'.
We have coverage for it in core in DateTimePlusTest::testInvalidDates; the setting defaults to TRUE and the test checks for the exception. We don't have coverage when it is FALSE.But, this setting on DateTimePlus is really one that I really think shouldn't be there, and that code needs to be refactored anyway. I don't see what you would pass in false. I'm half-tempted to say that we should remove the settings. That is the only setting on DTP.
Comment | File | Size | Author |
---|---|---|---|
#3 | 2865829-03.patch | 1.45 KB | mpdonadio |
Comments
Comment #2
heddnComment #3
mpdonadioOk, here is a test.
Comment #5
mpdonadioTriggering retest; I thought we fixed the 30sec curl thing: https://www.drupal.org/pift-ci-job/637415
Comment #7
mpdonadioComment #8
heddnThis explicitly tests the code under question.
Comment #9
alexpottCommitted and pushed c2ad4bc to 8.4.x and 038cf10 to 8.3.x. Thanks!
Added to 8.3.x because this is just additional test coverage.