Answer the question
In order to leave comments, you need to log in
How to simulate the system time of the server when testing (Laravel + phpunit)?
I have a piece of the program that works differently depending on the time and date,
how can this be (and should) be written in Laravel tests?
how to simulate different date and time?
thank.
Answer the question
In order to leave comments, you need to log in
In principle, if you use Carbon everywhere, it also has the ability to set a fake date.
https://carbon.nesbot.com/docs/#api-testing
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question