Skip to content

Commit

Permalink
Added months() to Wormhole (#36808)
Browse files Browse the repository at this point in the history
  • Loading branch information
lairg99 authored Mar 30, 2021
1 parent 2a73861 commit 36c1f18
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/Illuminate/Foundation/Testing/Wormhole.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,19 @@ public function weeks($callback = null)
return $this->handleCallback($callback);
}

/**
* Travel forward the given number of months.
*
* @param callable|null $callback
* @return mixed
*/
public function months($callback = null)
{
Carbon::setTestNow(Carbon::now()->addMonths($this->value));

return $this->handleCallback($callback);
}

/**
* Travel forward the given number of years.
*
Expand Down

0 comments on commit 36c1f18

Please sign in to comment.