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

refactor: make now() testable #6753

Merged
merged 3 commits into from Nov 5, 2022
Merged

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Oct 25, 2022

Needs #6752

Description
Fixes #5492
Supersedes #6684

  • refactor now()
  • fix test code

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • [] User guide updated
  • Conforms to style guide

@kenjis kenjis added the refactor Pull requests that refactor code label Oct 25, 2022
system/Helpers/date_helper.php Show resolved Hide resolved
system/I18n/Time.php Outdated Show resolved Hide resolved
@kenjis kenjis marked this pull request as draft October 25, 2022 12:28
@kenjis kenjis changed the base branch from develop to 4.3 November 4, 2022 02:50
@kenjis kenjis added the 4.3 label Nov 4, 2022
Copy link
Member

@MGatner MGatner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should never use time() in the entire framework except once in Time.

@kenjis kenjis marked this pull request as ready for review November 4, 2022 10:58
@kenjis kenjis merged commit d2ad6fc into codeigniter4:4.3 Nov 5, 2022
@kenjis kenjis deleted the refactor-date-now branch November 5, 2022 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.3 refactor Pull requests that refactor code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: DateHelperTest::testNowSpecific depends on time
3 participants