Skip to content

Commit

Permalink
[3.x] More flexibility when time traveling in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shane-zeng committed Nov 12, 2024
1 parent 7dd98c0 commit 94c1fc3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Time.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

namespace Pest\Laravel;

use DateTimeInterface;

/**
* Freeze time.
*
Expand Down Expand Up @@ -42,10 +40,11 @@ function travel($value)
/**
* Travel to another time.
*
* @param \DateTimeInterface|\Closure|\Illuminate\Support\Carbon|string|bool|null $date
* @param callable|null $callback
* @return mixed
*/
function travelTo(DateTimeInterface $date, $callback = null)
function travelTo($date, $callback = null)
{
return test()->travelTo(...func_get_args());
}
Expand Down

0 comments on commit 94c1fc3

Please sign in to comment.