Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.0 - report dates unit tests fail on the last day of the month #8532

Open
robincornett opened this issue Mar 31, 2021 · 0 comments · May be fixed by #8538
Open

3.0 - report dates unit tests fail on the last day of the month #8532

robincornett opened this issue Mar 31, 2021 · 0 comments · May be fixed by #8538

Comments

@robincornett
Copy link
Contributor

Bug Report

Expected behavior

I expect unit tests to work every day.

Actual behavior

On the last day of the month, these unit tests fail:

There were 5 failures:
1) Date_Functions_Tests::test_get_report_dates_correct_this_month_at_the_end_of_the_month_utc
Failed asserting that 4 matches expected '5'.
/tmp/P9X9ToBK3N62cYONreoCoz1Ol4ydT6EF/tests/tests-date-functions.php:137
2) Date_Functions_Tests::test_get_report_dates_correct_this_month_at_the_end_of_the_month_nz
Failed asserting that 3 matches expected '4'.
/tmp/P9X9ToBK3N62cYONreoCoz1Ol4ydT6EF/tests/tests-date-functions.php:153
3) Date_Functions_Tests::test_get_report_dates_correct_this_month_at_the_beginning_of_the_month_utc
Failed asserting that 4 matches expected '5'.
/tmp/P9X9ToBK3N62cYONreoCoz1Ol4ydT6EF/tests/tests-date-functions.php:183
4) Date_Functions_Tests::test_get_report_dates_correct_this_month_at_the_beginning_of_the_month_pdt
Failed asserting that 4 matches expected '5'.
/tmp/P9X9ToBK3N62cYONreoCoz1Ol4ydT6EF/tests/tests-date-functions.php:200
5) Date_Functions_Tests::test_get_report_dates_correct_this_moment_utc
Failed asserting that 4 matches expected '5'.
/tmp/P9X9ToBK3N62cYONreoCoz1Ol4ydT6EF/tests/tests-date-functions.php:218

Steps to reproduce the behavior

  1. Run unit tests on the last day of the month.

Information (if a specific version is affected):

PHP Version: all of the ones we test
EDD Version (or branch): release/3.0
WordPress Version: all of the ones we test

Any other relevant information:
Per Ashley:

I did find one bug, I think, which is that they pass time zones into edd_get_report_dates(), but ultimately that timezone never makes it into the function that actually builds the dates.

But there is likely more wrong than that. Since the tests work the rest of the month, filing this as a non-urgent issue but something we would like to figure out eventually.

@robincornett robincornett added this to the 3.0.5 milestone Mar 31, 2021
@ashleyfae ashleyfae linked a pull request Apr 1, 2021 that will close this issue
@ashleyfae ashleyfae linked a pull request Apr 1, 2021 that will close this issue
@cklosowski cklosowski removed this from the 3.0.5 milestone Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants