Skip to content

Commit

Permalink
Update NotificationFake with notifications getter (laravel#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 authored and Ken committed Aug 9, 2022
1 parent e7a9cb1 commit 08935ff
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 @@ -348,4 +348,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 08935ff

Please sign in to comment.