Commit 1514b2b
authored
tests: prevent output in phpunit tests (#1158)
I noticed an accidental `echo` left in a test during a recent review. It's best practice to avoid output during tests. Update PHPUnit config to make CI fail, rather than relying on human code review.
* Modify `ElasticSearchIndexDeleteTest` so it doesn't print output.
* `beStrictAboutOutputDuringTests` marks tests as "risky" if there is output printed.
* `failOnRisky` makes the test suite fail if any tests are marked as "risky".
Bug: T4287161 parent 5bbd9da commit 1514b2b
2 files changed
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | | - | |
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
| |||
0 commit comments