@@ -52,6 +52,7 @@ public function testReportReturnsEmptyStringWhenSlowTestListIsEmpty()
5252
5353 $ reporter = new Reporter \DefaultReporter (
5454 new Formatter \DefaultDurationFormatter (),
55+ MaximumDuration::fromDuration (Duration::fromMilliseconds ($ faker ->numberBetween (0 ))),
5556 MaximumCount::fromCount (Count::fromInt ($ faker ->numberBetween (1 )))
5657 );
5758
@@ -65,11 +66,13 @@ public function testReportReturnsEmptyStringWhenSlowTestListIsEmpty()
6566 */
6667 public function testReportReturnsReportWhenSlowTestListHasFewerSlowTestsThanMaximumCount (
6768 string $ expectedReport ,
69+ MaximumDuration $ maximumDuration ,
6870 MaximumCount $ maximumCount ,
6971 SlowTestList $ slowTestList
7072 ) {
7173 $ reporter = new Reporter \DefaultReporter (
7274 new Formatter \DefaultDurationFormatter (),
75+ $ maximumDuration ,
7376 $ maximumCount
7477 );
7578
@@ -79,7 +82,7 @@ public function testReportReturnsReportWhenSlowTestListHasFewerSlowTestsThanMaxi
7982 }
8083
8184 /**
82- * @return \Generator<string, array{0: string, 1: MaximumCount , 2: SlowTestList}>
85+ * @return \Generator<string, array{0: string, 1: MaximumDuration , 2: MaximumCount, 3 : SlowTestList}>
8386 */
8487 public static function provideExpectedReportMaximumCountAndSlowTestList (): iterable
8588 {
@@ -91,6 +94,7 @@ public static function provideExpectedReportMaximumCountAndSlowTestList(): itera
91941. 00:00.300 (00:00.100) FooTest::test
9295TXT
9396 ,
97+ MaximumDuration::fromDuration (Duration::fromMilliseconds (500 )),
9498 MaximumCount::fromCount (Count::fromInt (1 )),
9599 SlowTestList::create (
96100 SlowTest::create (
@@ -109,6 +113,7 @@ public static function provideExpectedReportMaximumCountAndSlowTestList(): itera
1091132. 00:00.275 (00:00.100) BarTest::test
110114TXT
111115 ,
116+ MaximumDuration::fromDuration (Duration::fromMilliseconds (500 )),
112117 MaximumCount::fromCount (Count::fromInt (2 )),
113118 SlowTestList::create (
114119 SlowTest::create (
@@ -134,6 +139,7 @@ public static function provideExpectedReportMaximumCountAndSlowTestList(): itera
1341393. 00:00.250 (00:00.100) BazTest::test
135140TXT
136141 ,
142+ MaximumDuration::fromDuration (Duration::fromMilliseconds (500 )),
137143 MaximumCount::fromCount (Count::fromInt (3 )),
138144 SlowTestList::create (
139145 SlowTest::create (
@@ -165,6 +171,7 @@ public static function provideExpectedReportMaximumCountAndSlowTestList(): itera
1651713. 00:00.250 (00:00.100) BazTest::test
166172TXT
167173 ,
174+ MaximumDuration::fromDuration (Duration::fromMilliseconds (500 )),
168175 MaximumCount::fromCount (Count::fromInt (3 )),
169176 SlowTestList::create (
170177 SlowTest::create (
@@ -203,6 +210,7 @@ public static function provideExpectedReportMaximumCountAndSlowTestList(): itera
20321010. 00:00.110 (00:00.100) FredTest::test
204211TXT
205212 ,
213+ MaximumDuration::fromDuration (Duration::fromMilliseconds (500 )),
206214 MaximumCount::fromCount (Count::fromInt (10 )),
207215 SlowTestList::create (
208216 SlowTest::create (
@@ -276,6 +284,7 @@ public static function provideExpectedReportMaximumCountAndSlowTestList(): itera
276284There is 1 additional slow test that is not listed here.
277285TXT
278286 ,
287+ MaximumDuration::fromDuration (Duration::fromMilliseconds (500 )),
279288 MaximumCount::fromCount (Count::fromInt (1 )),
280289 SlowTestList::create (
281290 SlowTest::create (
@@ -301,6 +310,7 @@ public static function provideExpectedReportMaximumCountAndSlowTestList(): itera
301310There are 2 additional slow tests that are not listed here.
302311TXT
303312 ,
313+ MaximumDuration::fromDuration (Duration::fromMilliseconds (500 )),
304314 MaximumCount::fromCount (Count::fromInt (1 )),
305315 SlowTestList::create (
306316 SlowTest::create (
@@ -325,9 +335,10 @@ public static function provideExpectedReportMaximumCountAndSlowTestList(): itera
325335 ],
326336 ];
327337
328- foreach ($ values as $ key => list ($ expected , $ maximumCount , $ slowTestList )) {
338+ foreach ($ values as $ key => list ($ expected , $ maximumDuration , $ maximumCount , $ slowTestList )) {
329339 yield $ key => [
330340 $ expected ,
341+ $ maximumDuration ,
331342 $ maximumCount ,
332343 $ slowTestList ,
333344 ];
0 commit comments