File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed
Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change 55use PHPStan \Rules \Rule ;
66use PHPStan \Testing \RuleTestCase ;
77use function defined ;
8+ use const PHP_VERSION_ID ;
89
910/**
1011 * @extends RuleTestCase<FetchingDeprecatedConstRule>
@@ -61,10 +62,14 @@ public function testFetchingDeprecatedConst(): void
6162
6263 public function testEstrictWithVersionGuard (): void
6364 {
64- require_once __DIR__ . '/data/bug-162.php ' ;
65- $ this ->analyse (
66- [__DIR__ . '/data/bug-162.php ' ],
65+ $ errors = [
6766 [
67+ 'Use of constant E_STRICT is deprecated. ' ,
68+ 7 ,
69+ ],
70+ ];
71+ if (PHP_VERSION_ID >= 80400 ) {
72+ $ errors = [
6873 [
6974 'Use of constant E_STRICT is deprecated. ' ,
7075 7 ,
@@ -73,7 +78,13 @@ public function testEstrictWithVersionGuard(): void
7378 'Use of constant E_STRICT is deprecated. ' ,
7479 18 ,
7580 ],
76- ],
81+ ];
82+ }
83+
84+ require_once __DIR__ . '/data/bug-162.php ' ;
85+ $ this ->analyse (
86+ [__DIR__ . '/data/bug-162.php ' ],
87+ $ errors ,
7788 );
7889 }
7990
You can’t perform that action at this time.
0 commit comments