Skip to content

Commit

Permalink
make method consistent with other fakes
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Nov 30, 2021
1 parent 0fb01ea commit 667cca8
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/Illuminate/Support/Testing/Fakes/NotificationFake.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,11 @@ public function assertNothingSent()
/**
* Assert the total amount of times a notification was sent.
*
* @param int $expectedCount
* @param string $notification
* @param int $expectedCount
* @return void
*/
public function assertTimesSent($expectedCount, $notification)
public function assertSentTimes($notification, $expectedCount)
{
$actualCount = collect($this->notifications)
->flatten(1)
Expand All @@ -179,6 +179,20 @@ public function assertTimesSent($expectedCount, $notification)
);
}

/**
* Assert the total amount of times a notification was sent.
*
* @param int $expectedCount
* @param string $notification
* @return void
*
* @deprecated Use the assertSentTimes method instead
*/
public function assertTimesSent($expectedCount, $notification)
{
$this->assertSentTimes($notification, $expectedCount);
}

/**
* Get all of the notifications matching a truth-test callback.
*
Expand Down

0 comments on commit 667cca8

Please sign in to comment.