Skip to content

Commit

Permalink
Update NotificationFake with notifications getter (#43558)
Browse files Browse the repository at this point in the history
When testing notifications this is super handy for testing whether the correct notifications
have been sent. Similar method is available in the QueueFake with `Queue::getJobs()`
  • Loading branch information
mikkoaf committed Aug 5, 2022
1 parent 33e1dfd commit 6cb7418
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Illuminate/Support/Testing/Fakes/NotificationFake.php
Expand Up @@ -362,4 +362,14 @@ public function locale($locale)

return $this;
}

/**
* Get the notifications that have been sent.
*
* @return array
*/
public function sentNotifications()
{
return $this->notifications;
}
}

0 comments on commit 6cb7418

Please sign in to comment.