Skip to content

Commit bc79241

Browse files
authored
[CodeQuality] Add failing fixture crash on deep ArrayItem as Foreach_ value on DirectInstanceOverMockArgRector (#632)
* [CodeQuality] Add failing fixture crash on deep ArrayItem as Foreach_ value on DirectInstanceOverMockArgRector * trigger CI to get latest rector-src
1 parent 4608de8 commit bc79241

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
namespace Rector\PHPUnit\Tests\CodeQuality\Rector\CallLike\DirectInstanceOverMockArgRector\Fixture;
4+
5+
use PHPUnit\Framework\TestCase;
6+
7+
final class SkipArrayItemForeachValueDeep extends TestCase
8+
{
9+
public function testThat()
10+
{
11+
$regex = '/(?P<version>\d+\.\d+\.\d+)/';
12+
$contents = 'VERSION: 1.0.0';
13+
$operations = [];
14+
15+
if (preg_match_all($regex, $contents, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER) > 0) {
16+
foreach ($matches as ['version' => [$fullVersion, $offset]]) {
17+
$operations[] = [$fullVersion, $offset];
18+
}
19+
}
20+
}
21+
}

0 commit comments

Comments
 (0)