How do I write unit tests for time based actions?
Totten, who is a complete legend, shared this pearl with me:


  there are some examples like:
  tests/phpunit/Civi/CCase/SequenceListenerTest.php:    \CRM_Utils_Time::setTime('2013-11-30 01:00:00');
  however, these are the exception rather than the rule. there are lots of places where someone called time() or strtotime() without reading CRM_Utils_Time to find the baseline.