Commit 6f43163
committed
Tests/AbstractArrayDeclarationSniffTest: work around for
The `TestCase::onConsecutiveCalls()` is soft deprecated in PHPUnit 10, hard deprecated in PHPUnit 11 and will be removed in PHPUnit 12.
While it is not strictly necessary to address this deprecation now, I've chosen to do so anyway.
Note: the method call is not directly changed from `->will($this->onConsecutiveCalls(...))` to `->willReturn(...)` - which is the PHPUnit native recommendation -, as this would make the test incompatible with older PHPUnit versions.
Additionally, a previous fix to work around the deprecation of `InvocationMocker->withConsecutive()` already uses the `willReturnCallback()` method, so the return value expectations will now need to be set via the `ExpectWithConsecutiveArgs::setExpectationWithConsecutiveArgs()` method.
Refs:
* sebastianbergmann/phpunit 5423
* sebastianbergmann/phpunit 5424TestCase::onConsecutiveCalls() deprecation1 parent c6cda6a commit 6f43163
File tree
2 files changed
+31
-6
lines changed- Tests
- AbstractSniffs/AbstractArrayDeclaration
2 files changed
+31
-6
lines changedLines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
290 | | - | |
291 | | - | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
292 | 293 | | |
293 | 294 | | |
294 | 295 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
20 | 26 | | |
| 27 | + | |
| 28 | + | |
21 | 29 | | |
22 | 30 | | |
23 | 31 | | |
| |||
30 | 38 | | |
31 | 39 | | |
32 | 40 | | |
| 41 | + | |
33 | 42 | | |
34 | 43 | | |
35 | 44 | | |
36 | | - | |
37 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
38 | 52 | | |
39 | 53 | | |
40 | 54 | | |
| |||
48 | 62 | | |
49 | 63 | | |
50 | 64 | | |
51 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
52 | 72 | | |
53 | 73 | | |
54 | 74 | | |
55 | 75 | | |
56 | | - | |
| 76 | + | |
57 | 77 | | |
58 | 78 | | |
59 | 79 | | |
| |||
76 | 96 | | |
77 | 97 | | |
78 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
79 | 103 | | |
80 | 104 | | |
81 | 105 | | |
| |||
0 commit comments