Commit 10e4a65
committed
AbstractMethodUnitTest: take advantage of the change in reportWidth handling
For the tests using the `AbstractMethodUnitTest` class, the `reportWidth` and most other config settings are irrelevant.
This commit changes some of the set up/tear down for the test to make the use of the `Config` class more efficient.
This should make the tests using the `AbstractMethodUnitTest` class as their base significantly faster (at the very least on Windows).
While not benchmarked properly, I have done some comparisons with the test runs on my local machine on Windows.
* `phpunit --filter Core` (= the tests which use this base class + a few extra tests):
Before: **2 minutes**.
After: **8 seconds**.
* The same effect can be seen when running `phpunit` without a `--filter`:
Before: **7 minutes**.
After: **5 minutes**.
* And when I apply a similar change to the one made here to the base test class in PHPCSUtils (4621 tests):
Before: **2.5 minutes**.
After: **1 second**.1 parent c6c6a10 commit 10e4a65
1 file changed
+40
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
48 | | - | |
49 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
50 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
51 | 65 | | |
52 | 66 | | |
53 | 67 | | |
| |||
74 | 88 | | |
75 | 89 | | |
76 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
77 | 97 | | |
78 | 98 | | |
79 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
80 | 118 | | |
81 | 119 | | |
82 | 120 | | |
| |||
0 commit comments