Skip to content

Commit 6d94b16

Browse files
Improved assertion message (#56579)
1 parent 6ab00c9 commit 6d94b16

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Illuminate/Support/Testing/Fakes/NotificationFake.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,11 @@ public function assertSentTimes($notification, $expectedCount)
215215

216216
PHPUnit::assertSame(
217217
$expectedCount, $actualCount,
218-
"Expected [{$notification}] to be sent {$expectedCount} times, but was sent {$actualCount} times."
218+
sprintf(
219+
"Expected [{$notification}] to be sent {$expectedCount} %s, but was sent {$actualCount} %s.",
220+
Str::plural('time', $expectedCount),
221+
Str::plural('time', $actualCount)
222+
)
219223
);
220224
}
221225

0 commit comments

Comments
 (0)