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
Copy file name to clipboardExpand all lines: docs/tools/phpunit.md
+18-15Lines changed: 18 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,24 @@
2
2
3
3
Here is the full documentation about how you can use and configure PHPUnit in your PHPQA project.
4
4
5
+
## Iterative Mode
6
+
7
+
When you have tests that are failing and you are working towards getting everything green, then you might want to try iterative mode.
8
+
9
+
The easiest way to do this is:
10
+
11
+
```bash
12
+
./bin/qa -t uniterate
13
+
```
14
+
15
+
This will run PHPunit in isolation
16
+
17
+
The first run will be a full run (unless you have done one previously)
18
+
19
+
Subsequent runs will then run your failed tests first and will stop on the first error.
20
+
21
+
This allows you to quickly iterate on your test suite and push it towards getting everything passing.
22
+
5
23
## Quick Tests
6
24
7
25
There is an environment variable for PHPUnit set called `phpUnitQuickTests`
@@ -129,21 +147,6 @@ We suggest that you install [https://github.com/phpstan/phpstan-phpunit](https:/
129
147
130
148
Read the [PHPQA PHPStan docs](./phpstan.md) for more information on this.
131
149
132
-
133
-
## Rerun Failed Tests
134
-
135
-
As with the other tools, there is an option to rerun this step if it fails.
136
-
137
-
Where PHPUnit is different is that you also get the option to only rerun your failed tests.
138
-
139
-
This uses another bin command [./bin/phpunit-runfailed-filter](./../../bin/phpunit-runfailed-filter) which generates the filter syntax to pull out the failed tests.
140
-
141
-
You can also use this in isolation if you want, eg:
0 commit comments