diff --git a/README.md b/README.md index bb32596d..2e3c2002 100644 --- a/README.md +++ b/README.md @@ -339,7 +339,7 @@ You can configure the maximum duration for a single test case with - `phpunit/phpunit:^8.5.19` - `phpunit/phpunit:^9.0.0` -The following example configures the maximum durations for single test cases to 5.000 ms, 4.000 ms, and 3.000 ms: +The following example configures the maximum durations for single test cases to 5, 4, and 3 seconds: ```php [ Duration::fromSecondsAndNanoseconds( 0, 123999000 ), - '0.123', + '123 ms', ], 'seconds-digits-one' => [ Duration::fromSecondsAndNanoseconds( 1, 234456789 ), - '1.234', + '1.234 s', ], 'seconds-digits-two' => [ Duration::fromSecondsAndNanoseconds( 12, 345678912 ), - '12.345', + '12.345 s', ], 'minutes-digits-one' => [ Duration::fromSecondsAndNanoseconds( diff --git a/test/Unit/Reporter/DefaultReporterTest.php b/test/Unit/Reporter/DefaultReporterTest.php index c1a14d0b..bb7394c1 100644 --- a/test/Unit/Reporter/DefaultReporterTest.php +++ b/test/Unit/Reporter/DefaultReporterTest.php @@ -85,7 +85,7 @@ public static function provideExpectedReportMaximumDurationMaximumCountAndSlowTe <<<'TXT' Detected 1 test where the duration exceeded the maximum duration. -1. 0.300 (0.100) FooTest::test +1. 300 ms (100 ms) FooTest::test TXT , Duration::fromMilliseconds(500), @@ -103,8 +103,8 @@ public static function provideExpectedReportMaximumDurationMaximumCountAndSlowTe <<<'TXT' Detected 2 tests where the duration exceeded the maximum duration. -1. 0.300 (0.100) FooTest::test -2. 0.275 (0.100) BarTest::test +1. 300 ms (100 ms) FooTest::test +2. 275 ms (100 ms) BarTest::test TXT , Duration::fromMilliseconds(500), @@ -128,9 +128,9 @@ public static function provideExpectedReportMaximumDurationMaximumCountAndSlowTe <<<'TXT' Detected 3 tests where the duration exceeded the maximum duration. -1. 0.300 (0.100) FooTest::test -2. 0.275 (0.100) BarTest::test -3. 0.250 (0.100) BazTest::test +1. 300 ms (100 ms) FooTest::test +2. 275 ms (100 ms) BarTest::test +3. 250 ms (100 ms) BazTest::test TXT , Duration::fromMilliseconds(500), @@ -160,9 +160,9 @@ public static function provideExpectedReportMaximumDurationMaximumCountAndSlowTe <<<'TXT' Detected 3 tests where the duration exceeded the maximum duration. -1. 0.300 (0.100) FooTest::test -2. 0.275 (0.100) BarTest::test -3. 0.250 (0.100) BazTest::test +1. 300 ms (100 ms) FooTest::test +2. 275 ms (100 ms) BarTest::test +3. 250 ms (100 ms) BazTest::test TXT , Duration::fromMilliseconds(500), @@ -194,14 +194,14 @@ public static function provideExpectedReportMaximumDurationMaximumCountAndSlowTe 1. 20:50.000 (16:40.000) FooTest::test 2. 9:35.000 ( 8:20.000) BarTest::test - 3. 0.250 ( 0.100) BazTest::test - 4. 0.200 ( 0.100) QuxTest::test - 5. 0.160 ( 0.100) QuuxTest::test - 6. 0.150 ( 0.100) CorgeTest::test - 7. 0.140 ( 0.100) GraultTest::test - 8. 0.130 ( 0.100) GarplyTest::test - 9. 0.120 ( 0.100) WaldoTest::test -10. 0.110 ( 0.100) FredTest::test + 3. 250 ms ( 100 ms) BazTest::test + 4. 200 ms ( 100 ms) QuxTest::test + 5. 160 ms ( 100 ms) QuuxTest::test + 6. 150 ms ( 100 ms) CorgeTest::test + 7. 140 ms ( 100 ms) GraultTest::test + 8. 130 ms ( 100 ms) GarplyTest::test + 9. 120 ms ( 100 ms) WaldoTest::test +10. 110 ms ( 100 ms) FredTest::test TXT , Duration::fromMilliseconds(500), @@ -273,7 +273,7 @@ public static function provideExpectedReportMaximumDurationMaximumCountAndSlowTe <<<'TXT' Detected 2 tests where the duration exceeded the maximum duration. -1. 0.300 (0.100) FooTest::test +1. 300 ms (100 ms) FooTest::test There is 1 additional slow test that is not listed here. TXT @@ -299,7 +299,7 @@ public static function provideExpectedReportMaximumDurationMaximumCountAndSlowTe <<<'TXT' Detected 3 tests where the duration exceeded the maximum duration. -1. 0.300 (0.100) FooTest::test +1. 300 ms (100 ms) FooTest::test There are 2 additional slow tests that are not listed here. TXT