diff --git a/test/EndToEnd/Version10/DefaultConfiguration/SleeperTest.php b/test/EndToEnd/Version10/DefaultConfiguration/SleeperTest.php index 99bfac4c..4e0bcdf1 100644 --- a/test/EndToEnd/Version10/DefaultConfiguration/SleeperTest.php +++ b/test/EndToEnd/Version10/DefaultConfiguration/SleeperTest.php @@ -21,6 +21,26 @@ final class SleeperTest extends Framework\TestCase { use Test\Util\Helper; + public static function setUpBeforeClass(): void + { + Test\Fixture\Sleeper::fromMilliseconds(50)->sleep(); + } + + public static function tearDownAfterClass(): void + { + Test\Fixture\Sleeper::fromMilliseconds(50)->sleep(); + } + + protected function setUp(): void + { + Test\Fixture\Sleeper::fromMilliseconds(50)->sleep(); + } + + protected function tearDown(): void + { + Test\Fixture\Sleeper::fromMilliseconds(50)->sleep(); + } + public function testSleeperDoesNotSleepAtAll(): void { $milliseconds = 0; diff --git a/test/EndToEnd/Version10/MaximumCount/Three/SleeperTest.php b/test/EndToEnd/Version10/MaximumCount/Three/SleeperTest.php index d2323fdf..4361c37a 100644 --- a/test/EndToEnd/Version10/MaximumCount/Three/SleeperTest.php +++ b/test/EndToEnd/Version10/MaximumCount/Three/SleeperTest.php @@ -21,6 +21,26 @@ final class SleeperTest extends Framework\TestCase { use Test\Util\Helper; + public static function setUpBeforeClass(): void + { + Test\Fixture\Sleeper::fromMilliseconds(50)->sleep(); + } + + public static function tearDownAfterClass(): void + { + Test\Fixture\Sleeper::fromMilliseconds(50)->sleep(); + } + + protected function setUp(): void + { + Test\Fixture\Sleeper::fromMilliseconds(50)->sleep(); + } + + protected function tearDown(): void + { + Test\Fixture\Sleeper::fromMilliseconds(50)->sleep(); + } + public function testSleeperDoesNotSleepAtAll(): void { $milliseconds = 0; diff --git a/test/EndToEnd/Version10/MaximumDuration/Fifty/SleeperTest.php b/test/EndToEnd/Version10/MaximumDuration/Fifty/SleeperTest.php index 3db3e29e..682c0982 100644 --- a/test/EndToEnd/Version10/MaximumDuration/Fifty/SleeperTest.php +++ b/test/EndToEnd/Version10/MaximumDuration/Fifty/SleeperTest.php @@ -22,6 +22,26 @@ final class SleeperTest extends Framework\TestCase { use Test\Util\Helper; + public static function setUpBeforeClass(): void + { + Test\Fixture\Sleeper::fromMilliseconds(50)->sleep(); + } + + public static function tearDownAfterClass(): void + { + Test\Fixture\Sleeper::fromMilliseconds(50)->sleep(); + } + + protected function setUp(): void + { + Test\Fixture\Sleeper::fromMilliseconds(50)->sleep(); + } + + protected function tearDown(): void + { + Test\Fixture\Sleeper::fromMilliseconds(50)->sleep(); + } + public function testSleeperDoesNotSleepAtAll(): void { $milliseconds = 0; diff --git a/test/EndToEnd/Version8/DefaultConfiguration/SleeperTest.php b/test/EndToEnd/Version8/DefaultConfiguration/SleeperTest.php index 26fcd1fa..b1bad5f8 100644 --- a/test/EndToEnd/Version8/DefaultConfiguration/SleeperTest.php +++ b/test/EndToEnd/Version8/DefaultConfiguration/SleeperTest.php @@ -23,6 +23,26 @@ final class SleeperTest extends Framework\TestCase { use Test\Util\Helper; + public static function setUpBeforeClass(): void + { + Test\Fixture\Sleeper::fromMilliseconds(50)->sleep(); + } + + public static function tearDownAfterClass(): void + { + Test\Fixture\Sleeper::fromMilliseconds(50)->sleep(); + } + + protected function setUp(): void + { + Test\Fixture\Sleeper::fromMilliseconds(50)->sleep(); + } + + protected function tearDown(): void + { + Test\Fixture\Sleeper::fromMilliseconds(50)->sleep(); + } + public function testSleeperDoesNotSleepAtAll(): void { $milliseconds = 0; diff --git a/test/EndToEnd/Version8/DefaultConfiguration/test.phpt b/test/EndToEnd/Version8/DefaultConfiguration/test.phpt index d00a1298..a830da25 100644 --- a/test/EndToEnd/Version8/DefaultConfiguration/test.phpt +++ b/test/EndToEnd/Version8/DefaultConfiguration/test.phpt @@ -23,16 +23,16 @@ Random %seed: %s Detected 11 tests that took longer than expected. - 1. 1.0%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #10 (1050) - 2. 1.0%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #9 (1000) - 3. 0.9%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #8 (950) - 4. 0.9%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #7 (900) - 5. 0.8%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #6 (850) - 6. 0.8%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #5 (800) - 7. 0.7%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #4 (750) - 8. 0.7%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #3 (700) - 9. 0.6%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #2 (650) -10. 0.6%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #1 (600) + 1. 1.1%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #10 (1050) + 2. 1.1%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #9 (1000) + 3. 1.0%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #8 (950) + 4. 1.0%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #7 (900) + 5. 0.9%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #6 (850) + 6. 0.9%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #5 (800) + 7. 0.8%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #4 (750) + 8. 0.8%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #3 (700) + 9. 0.7%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #2 (650) +10. 0.7%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #1 (600) There is 1 additional slow test that is not listed here. diff --git a/test/EndToEnd/Version8/MaximumCount/Three/SleeperTest.php b/test/EndToEnd/Version8/MaximumCount/Three/SleeperTest.php index c26893f1..bb825f69 100644 --- a/test/EndToEnd/Version8/MaximumCount/Three/SleeperTest.php +++ b/test/EndToEnd/Version8/MaximumCount/Three/SleeperTest.php @@ -23,6 +23,26 @@ final class SleeperTest extends Framework\TestCase { use Test\Util\Helper; + public static function setUpBeforeClass(): void + { + Test\Fixture\Sleeper::fromMilliseconds(50)->sleep(); + } + + public static function tearDownAfterClass(): void + { + Test\Fixture\Sleeper::fromMilliseconds(50)->sleep(); + } + + protected function setUp(): void + { + Test\Fixture\Sleeper::fromMilliseconds(50)->sleep(); + } + + protected function tearDown(): void + { + Test\Fixture\Sleeper::fromMilliseconds(50)->sleep(); + } + public function testSleeperDoesNotSleepAtAll(): void { $milliseconds = 0; diff --git a/test/EndToEnd/Version8/MaximumCount/Three/test.phpt b/test/EndToEnd/Version8/MaximumCount/Three/test.phpt index 03139059..ff2d8af1 100644 --- a/test/EndToEnd/Version8/MaximumCount/Three/test.phpt +++ b/test/EndToEnd/Version8/MaximumCount/Three/test.phpt @@ -23,9 +23,9 @@ Random %seed: %s Detected 4 tests that took longer than expected. -1. 0.7%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumCount\Three\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #3 (700) -2. 0.6%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumCount\Three\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #2 (650) -3. 0.6%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumCount\Three\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #1 (600) +1. 0.8%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumCount\Three\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #3 (700) +2. 0.7%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumCount\Three\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #2 (650) +3. 0.7%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumCount\Three\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #1 (600) There is 1 additional slow test that is not listed here. diff --git a/test/EndToEnd/Version8/MaximumDuration/Fifty/SleeperTest.php b/test/EndToEnd/Version8/MaximumDuration/Fifty/SleeperTest.php index a142538a..6a941fbd 100644 --- a/test/EndToEnd/Version8/MaximumDuration/Fifty/SleeperTest.php +++ b/test/EndToEnd/Version8/MaximumDuration/Fifty/SleeperTest.php @@ -23,6 +23,26 @@ final class SleeperTest extends Framework\TestCase { use Test\Util\Helper; + public static function setUpBeforeClass(): void + { + Test\Fixture\Sleeper::fromMilliseconds(50)->sleep(); + } + + public static function tearDownAfterClass(): void + { + Test\Fixture\Sleeper::fromMilliseconds(50)->sleep(); + } + + protected function setUp(): void + { + Test\Fixture\Sleeper::fromMilliseconds(50)->sleep(); + } + + protected function tearDown(): void + { + Test\Fixture\Sleeper::fromMilliseconds(50)->sleep(); + } + public function testSleeperDoesNotSleepAtAll(): void { $milliseconds = 0; diff --git a/test/EndToEnd/Version8/MaximumDuration/Fifty/test.phpt b/test/EndToEnd/Version8/MaximumDuration/Fifty/test.phpt index f452e1a7..31c65461 100644 --- a/test/EndToEnd/Version8/MaximumDuration/Fifty/test.phpt +++ b/test/EndToEnd/Version8/MaximumDuration/Fifty/test.phpt @@ -21,14 +21,18 @@ Random %seed: %s .......... 10 / 10 (100%) -Detected 6 tests that took longer than expected. - -1. 0.2%s (0.200) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsLongerThanMaximumDurationFromSlowThresholdAnnotation -2. 0.2%s (0.180) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsLongerThanMaximumDurationFromMaximumDurationAnnotationWhenSlowThresholdAnnotationIsPresentBeforeMaximumDuration -3. 0.1%s (0.160) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsLongerThanMaximumDurationFromMaximumDurationAnnotationWhenSlowThresholdAnnotationIsPresentAfterMaximumDuration -4. 0.1%s (0.150) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsLongerThanMaximumDurationFromMaximumDurationAnnotation -5. 0.1%s (0.050) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsWithDocBlockWithMaximumDurationAnnotationWhereValueIsNotAnInt -6. 0.0%s (0.050) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsWithDocBlockWithoutSlowThresholdAnnotation +Detected 10 tests that took longer than expected. + + 1. 0.3%s (0.200) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsLongerThanMaximumDurationFromSlowThresholdAnnotation + 2. 0.3%s (0.180) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsLongerThanMaximumDurationFromMaximumDurationAnnotationWhenSlowThresholdAnnotationIsPresentBeforeMaximumDuration + 3. 0.2%s (0.160) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsLongerThanMaximumDurationFromMaximumDurationAnnotationWhenSlowThresholdAnnotationIsPresentAfterMaximumDuration + 4. 0.2%s (0.150) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsLongerThanMaximumDurationFromMaximumDurationAnnotation + 5. 0.2%s (0.140) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsShorterThanMaximumDurationFromMaximumDurationAnnotation + 6. 0.2%s (0.050) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsWithDocBlockWithMaximumDurationAnnotationWhereValueIsNotAnInt + 7. 0.2%s (0.050) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsWithDocBlockWithoutSlowThresholdAnnotation + 8. 0.1%s (0.100) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsShorterThanMaximumDurationFromSlowThresholdAnnotation + 9. 0.1%s (0.050) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsWithDocBlockWithSlowThresholdAnnotationWhereValueIsNotAnInt +10. 0.1%s (0.050) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version8\MaximumDuration\Fifty\SleeperTest::testSleeperDoesNotSleepAtAll Time: %s, Memory: %s diff --git a/test/EndToEnd/Version9/DefaultConfiguration/SleeperTest.php b/test/EndToEnd/Version9/DefaultConfiguration/SleeperTest.php index 75f399a9..dfa8e62a 100644 --- a/test/EndToEnd/Version9/DefaultConfiguration/SleeperTest.php +++ b/test/EndToEnd/Version9/DefaultConfiguration/SleeperTest.php @@ -23,6 +23,26 @@ final class SleeperTest extends Framework\TestCase { use Test\Util\Helper; + public static function setUpBeforeClass(): void + { + Test\Fixture\Sleeper::fromMilliseconds(50)->sleep(); + } + + public static function tearDownAfterClass(): void + { + Test\Fixture\Sleeper::fromMilliseconds(50)->sleep(); + } + + protected function setUp(): void + { + Test\Fixture\Sleeper::fromMilliseconds(50)->sleep(); + } + + protected function tearDown(): void + { + Test\Fixture\Sleeper::fromMilliseconds(50)->sleep(); + } + public function testSleeperDoesNotSleepAtAll(): void { $milliseconds = 0; diff --git a/test/EndToEnd/Version9/DefaultConfiguration/test.phpt b/test/EndToEnd/Version9/DefaultConfiguration/test.phpt index 1ff712e6..5eaeddcb 100644 --- a/test/EndToEnd/Version9/DefaultConfiguration/test.phpt +++ b/test/EndToEnd/Version9/DefaultConfiguration/test.phpt @@ -23,16 +23,16 @@ Random %seed: %s Detected 11 tests that took longer than expected. - 1. 1.0%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #10 (1050) - 2. 1.0%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #9 (1000) - 3. 0.9%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #8 (950) - 4. 0.9%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #7 (900) - 5. 0.8%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #6 (850) - 6. 0.8%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #5 (800) - 7. 0.7%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #4 (750) - 8. 0.7%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #3 (700) - 9. 0.6%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #2 (650) -10. 0.6%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #1 (600) + 1. 1.1%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #10 (1050) + 2. 1.1%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #9 (1000) + 3. 1.0%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #8 (950) + 4. 1.0%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #7 (900) + 5. 0.9%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #6 (850) + 6. 0.9%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #5 (800) + 7. 0.8%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #4 (750) + 8. 0.8%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #3 (700) + 9. 0.7%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #2 (650) +10. 0.7%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\DefaultConfiguration\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #1 (600) There is 1 additional slow test that is not listed here. diff --git a/test/EndToEnd/Version9/MaximumCount/Three/SleeperTest.php b/test/EndToEnd/Version9/MaximumCount/Three/SleeperTest.php index f859bf0e..2505b68f 100644 --- a/test/EndToEnd/Version9/MaximumCount/Three/SleeperTest.php +++ b/test/EndToEnd/Version9/MaximumCount/Three/SleeperTest.php @@ -23,6 +23,26 @@ final class SleeperTest extends Framework\TestCase { use Test\Util\Helper; + public static function setUpBeforeClass(): void + { + Test\Fixture\Sleeper::fromMilliseconds(50)->sleep(); + } + + public static function tearDownAfterClass(): void + { + Test\Fixture\Sleeper::fromMilliseconds(50)->sleep(); + } + + protected function setUp(): void + { + Test\Fixture\Sleeper::fromMilliseconds(50)->sleep(); + } + + protected function tearDown(): void + { + Test\Fixture\Sleeper::fromMilliseconds(50)->sleep(); + } + public function testSleeperDoesNotSleepAtAll(): void { $milliseconds = 0; diff --git a/test/EndToEnd/Version9/MaximumCount/Three/test.phpt b/test/EndToEnd/Version9/MaximumCount/Three/test.phpt index 4f52ad71..2b7e48a3 100644 --- a/test/EndToEnd/Version9/MaximumCount/Three/test.phpt +++ b/test/EndToEnd/Version9/MaximumCount/Three/test.phpt @@ -23,9 +23,9 @@ Random %seed: %s Detected 4 tests that took longer than expected. -1. 0.7%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\MaximumCount\Three\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #3 (700) -2. 0.6%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\MaximumCount\Three\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #2 (650) -3. 0.6%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\MaximumCount\Three\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #1 (600) +1. 0.8%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\MaximumCount\Three\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #3 (700) +2. 0.7%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\MaximumCount\Three\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #2 (650) +3. 0.7%s (0.500) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\MaximumCount\Three\SleeperTest::testSleeperSleepsLongerThanDefaultMaximumDurationWithDataProvider with data set #1 (600) There is 1 additional slow test that is not listed here. diff --git a/test/EndToEnd/Version9/MaximumDuration/Fifty/SleeperTest.php b/test/EndToEnd/Version9/MaximumDuration/Fifty/SleeperTest.php index 4196dc68..ad695866 100644 --- a/test/EndToEnd/Version9/MaximumDuration/Fifty/SleeperTest.php +++ b/test/EndToEnd/Version9/MaximumDuration/Fifty/SleeperTest.php @@ -23,6 +23,26 @@ final class SleeperTest extends Framework\TestCase { use Test\Util\Helper; + public static function setUpBeforeClass(): void + { + Test\Fixture\Sleeper::fromMilliseconds(50)->sleep(); + } + + public static function tearDownAfterClass(): void + { + Test\Fixture\Sleeper::fromMilliseconds(50)->sleep(); + } + + protected function setUp(): void + { + Test\Fixture\Sleeper::fromMilliseconds(50)->sleep(); + } + + protected function tearDown(): void + { + Test\Fixture\Sleeper::fromMilliseconds(50)->sleep(); + } + public function testSleeperDoesNotSleepAtAll(): void { $milliseconds = 0; diff --git a/test/EndToEnd/Version9/MaximumDuration/Fifty/test.phpt b/test/EndToEnd/Version9/MaximumDuration/Fifty/test.phpt index 3cc24746..9fe0f794 100644 --- a/test/EndToEnd/Version9/MaximumDuration/Fifty/test.phpt +++ b/test/EndToEnd/Version9/MaximumDuration/Fifty/test.phpt @@ -21,14 +21,18 @@ Random %seed: %s .......... 10 / 10 (100%) -Detected 6 tests that took longer than expected. - -1. 0.2%s (0.200) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsLongerThanMaximumDurationFromSlowThresholdAnnotation -2. 0.2%s (0.180) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsLongerThanMaximumDurationFromMaximumDurationAnnotationWhenSlowThresholdAnnotationIsPresentBeforeMaximumDuration -3. 0.1%s (0.160) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsLongerThanMaximumDurationFromMaximumDurationAnnotationWhenSlowThresholdAnnotationIsPresentAfterMaximumDuration -4. 0.1%s (0.150) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsLongerThanMaximumDurationFromMaximumDurationAnnotation -5. 0.1%s (0.050) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsWithDocBlockWithMaximumDurationAnnotationWhereValueIsNotAnInt -6. 0.0%s (0.050) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsWithDocBlockWithoutSlowThresholdAnnotation +Detected 10 tests that took longer than expected. + + 1. 0.3%s (0.200) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsLongerThanMaximumDurationFromSlowThresholdAnnotation + 2. 0.3%s (0.180) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsLongerThanMaximumDurationFromMaximumDurationAnnotationWhenSlowThresholdAnnotationIsPresentBeforeMaximumDuration + 3. 0.2%s (0.160) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsLongerThanMaximumDurationFromMaximumDurationAnnotationWhenSlowThresholdAnnotationIsPresentAfterMaximumDuration + 4. 0.2%s (0.150) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsLongerThanMaximumDurationFromMaximumDurationAnnotation + 5. 0.2%s (0.140) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsShorterThanMaximumDurationFromMaximumDurationAnnotation + 6. 0.2%s (0.050) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsWithDocBlockWithMaximumDurationAnnotationWhereValueIsNotAnInt + 7. 0.2%s (0.050) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsWithDocBlockWithoutSlowThresholdAnnotation + 8. 0.1%s (0.100) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsShorterThanMaximumDurationFromSlowThresholdAnnotation + 9. 0.1%s (0.050) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\MaximumDuration\Fifty\SleeperTest::testSleeperSleepsWithDocBlockWithSlowThresholdAnnotationWhereValueIsNotAnInt +10. 0.1%s (0.050) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version9\MaximumDuration\Fifty\SleeperTest::testSleeperDoesNotSleepAtAll Time: %s, Memory: %s