|
11 | 11 | use ReflectionProperty; |
12 | 12 |
|
13 | 13 | use function array_keys; |
14 | | -use function method_exists; |
15 | 14 | use function preg_match; |
16 | 15 |
|
17 | 16 | /** |
@@ -151,13 +150,7 @@ public function testReadFormPathsCallBack(): void |
151 | 150 | $this->assertIsString($result[1]); |
152 | 151 |
|
153 | 152 | // needs regexp because the counter is static |
154 | | - |
155 | | - if (method_exists($this, 'assertMatchesRegularExpression')) { |
156 | | - $this->assertMatchesRegularExpression('/^preffoo\/foo\/bar\/\:group\:end\:\d+$/', $result[1]); |
157 | | - } else { |
158 | | - /** @psalm-suppress DeprecatedMethod */ |
159 | | - $this->assertRegExp('/^preffoo\/foo\/bar\/\:group\:end\:\d+$/', $result[1]); |
160 | | - } |
| 153 | + $this->assertMatchesRegularExpression('/^preffoo\/foo\/bar\/\:group\:end\:\d+$/', $result[1]); |
161 | 154 | } |
162 | 155 |
|
163 | 156 | /** |
@@ -189,17 +182,10 @@ public function testReadFormPaths(): void |
189 | 182 | unset($result['test']); |
190 | 183 |
|
191 | 184 | // needs regexp because the counter is static |
192 | | - |
193 | | - $keys = array_keys($result); |
194 | | - $key = $keys[0]; |
| 185 | + $key = array_keys($result)[0]; |
195 | 186 | $this->assertIsString($key); |
196 | 187 |
|
197 | | - if (method_exists($this, 'assertMatchesRegularExpression')) { |
198 | | - $this->assertMatchesRegularExpression('/^\:group\:end\:(\d+)$/', $key); |
199 | | - } else { |
200 | | - /** @psalm-suppress DeprecatedMethod */ |
201 | | - $this->assertRegExp('/^\:group\:end\:(\d+)$/', $key); |
202 | | - } |
| 188 | + $this->assertMatchesRegularExpression('/^\:group\:end\:(\d+)$/', $key); |
203 | 189 |
|
204 | 190 | preg_match('/^\:group\:end\:(\d+)$/', $key, $matches); |
205 | 191 | $digit = $matches[1]; |
|
0 commit comments