Commit d03bacc
committed
AbstractMethodUnitTest: move getTargetToken() logic to static method
The Core test suite is going to get at least one more test case and this new test case class will also need a `getTargetToken()` method.
To prevent having to duplicate the logic and needing to maintain it in multiple places, this commit introduces a `getTargetTokenFromFile()` method which takes a `$phpcsFile` parameter, which allows for the method to become `static`, which in turn allows for the method to be used by other test case classes.
The original `getTargetToken()` method still has the same functionality as before, it now just calls the `getTargetTokenFromFile()` method under the hood.1 parent 50a5645 commit d03bacc
1 file changed
+27
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
95 | | - | |
96 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
97 | 118 | | |
98 | 119 | | |
99 | 120 | | |
100 | 121 | | |
101 | 122 | | |
102 | 123 | | |
103 | 124 | | |
104 | | - | |
| 125 | + | |
105 | 126 | | |
106 | 127 | | |
107 | 128 | | |
| |||
116 | 137 | | |
117 | 138 | | |
118 | 139 | | |
119 | | - | |
| 140 | + | |
120 | 141 | | |
121 | 142 | | |
122 | 143 | | |
| |||
130 | 151 | | |
131 | 152 | | |
132 | 153 | | |
133 | | - | |
| 154 | + | |
134 | 155 | | |
135 | 156 | | |
136 | 157 | | |
137 | 158 | | |
138 | | - | |
| 159 | + | |
139 | 160 | | |
140 | 161 | | |
141 | 162 | | |
| |||
0 commit comments