You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
to install `ergebnis/phpunit-slow-test-detector` as a `composer` package when using `phpunit/phpunit:^8.5.19`, `phpunit/phpunit:^9.0.0`, or `phpunit/phpunit:^10.0.0`.
34
+
to install `ergebnis/phpunit-slow-test-detector` as a `composer` package when using `phpunit/phpunit:^7.2.0`, `phpunit/phpunit:^8.5.19`, `phpunit/phpunit:^9.0.0`, or `phpunit/phpunit:^10.0.0`.
34
35
35
36
### Installation as Phar
36
37
@@ -42,6 +43,27 @@ Download `phpunit-slow-test-detector.phar` from the [latest release](https://git
42
43
43
44
Before the extension can detect slow tests in `phpunit/phpunit`, you need to bootstrap it. The bootstrapping mechanism depends on the version of `phpunit/phpunit` you are using.
44
45
46
+
### Bootstrapping the extension as a `composer` package when using `phpunit/phpunit:^7.2.0`
47
+
48
+
To bootstrap the extension as a `composer` package when using `phpunit/phpunit:^7.2.0`, adjust your `phpunit.xml` configuration file and configure the [`extensions` element](https://docs.phpunit.de/en/7.5/configuration.html#the-extensions-element):
### Bootstrapping the extension as a `composer` package when using `phpunit/phpunit:^8.5.19`
46
68
47
69
To bootstrap the extension as a `composer` package when using `phpunit/phpunit:^8.5.19`, adjust your `phpunit.xml` configuration file and configure the [`extensions` element](https://docs.phpunit.de/en/8.5/configuration.html#the-extensions-element):
@@ -136,6 +158,38 @@ You can configure the extension with the following options in your `phpunit.xml`
136
158
137
159
The configuration mechanism depends on the version of `phpunit/phpunit` you are using.
138
160
161
+
### Configuring the extension when using `phpunit/phpunit:^7.2.0`
162
+
163
+
The following example configures the maximum count of slow tests to three, and the maximum duration for all tests to 250 milliseconds when using `phpunit/phpunit:^7.2.0`:
### Configuring the extension when using `phpunit/phpunit:^8.5.19`
140
194
141
195
The following example configures the maximum count of slow tests to three, and the maximum duration for all tests to 250 milliseconds when using `phpunit/phpunit:^8.5.19`:
@@ -232,8 +286,8 @@ The following example configures the maximum count of slow tests to three, and t
232
286
You can configure the maximum duration for a single test case with
233
287
234
288
- an `Attribute\MaximumDuration` attribute when using `phpunit/phpunit:^10.0.0`
235
-
- a `@maximumDuration` annotation in the DocBlock when using `phpunit/phpunit:^8.5.19` or `phpunit/phpunit:^9.0.0`
236
-
- a `@slowThreshold` annotation in the DocBlock when using `phpunit/phpunit:^8.5.19` or `phpunit/phpunit:^9.0.0`
289
+
- a `@maximumDuration` annotation in the DocBlock when using `phpunit/phpunit:^7.2.0`, `phpunit/phpunit:^8.5.19`, or `phpunit/phpunit:^9.0.0`
290
+
- a `@slowThreshold` annotation in the DocBlock when using `phpunit/phpunit:^7.2.0`, `phpunit/phpunit:^8.5.19`, or `phpunit/phpunit:^9.0.0`
237
291
238
292
The following example configures the maximum durations for single test cases to 5.000 ms, 4.000 ms, and 3.000 ms:
### Understanding measured test durations when using `phpunit/phpunit:^8.5.19` or `phpunit/phpunit:^9.0.0`
373
+
### Understanding measured test durations when using `phpunit/phpunit:^7.2.0`,`phpunit/phpunit:^8.5.19`, or `phpunit/phpunit:^9.0.0`
320
374
321
-
When using `phpunit/phpunit:^8.5.19` or `phpunit/phpunit:^9.0.0`, the extension uses the hooks event system of `phpunit/phpunit`.
375
+
When using `phpunit/phpunit:^7.2.0`, `phpunit/phpunit:^8.5.19`, or `phpunit/phpunit:^9.0.0` the extension uses the hooks event system of `phpunit/phpunit`.
322
376
323
377
The hooks event system supports eleven hook methods that `phpunit/phpunit` invokes during the execution of tests.
0 commit comments