Skip to content

Commit acb109f

Browse files
committed
Try reproduce a bug locally
1 parent 4f142f5 commit acb109f

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

tests/PHPStan/Rules/Keywords/RequireFileExistsRuleTest.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,4 +121,18 @@ public function testBug11738(): void
121121
$this->analyse([__DIR__ . '/data/bug-11738/bug-11738.php'], []);
122122
}
123123

124+
public function testBug12203(): void
125+
{
126+
$this->analyse([__DIR__ . '/data/bug-12203.php'], [
127+
[
128+
'Path in require_once() "../bug-12203-sure-does-not-exist.php" is not a file or it does not exist.',
129+
5,
130+
],
131+
[
132+
'Path in require_once() "' . __DIR__ . '/data/../bug-12203-sure-does-not-exist.php" is not a file or it does not exist.',
133+
6,
134+
],
135+
]);
136+
}
137+
124138
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?php
2+
3+
namespace Bug12203;
4+
5+
require_once '../bug-12203-sure-does-not-exist.php';
6+
require_once __DIR__ . '/../bug-12203-sure-does-not-exist.php';

0 commit comments

Comments
 (0)