From 644e3df1927b97230806b7676f89ff15a5e5eebb Mon Sep 17 00:00:00 2001 From: Remon van de Kamp Date: Fri, 31 Jan 2020 09:50:51 +0100 Subject: [PATCH] Add more test cases for looping through all messages --- tests/integration/MailhogClientTest.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/integration/MailhogClientTest.php b/tests/integration/MailhogClientTest.php index fd87384..6651470 100644 --- a/tests/integration/MailhogClientTest.php +++ b/tests/integration/MailhogClientTest.php @@ -139,6 +139,7 @@ public function it_should_throw_exception_when_there_is_no_last_message(): void /** * @test + * @dataProvider limitProvider */ public function it_should_query_mailhog_until_all_messages_have_been_received(): void { @@ -168,6 +169,16 @@ function (Message $message) { } } + public function limitProvider(): array + { + return [ + 'one by one' => [1], + 'limit less than total' => [2], + 'limit equal to total' => [5], + 'limit more than total' => [10], + ]; + } + /** * @test * @dataProvider specificationProvider