File tree Expand file tree Collapse file tree 4 files changed +80
-6
lines changed Expand file tree Collapse file tree 4 files changed +80
-6
lines changed Original file line number Diff line number Diff line change 55use PHPStan \Testing \TypeInferenceTestCase ;
66use PHPUnit \Framework \Attributes \DataProvider ;
77
8- class NodeScopeResolverPhp7Test extends TypeInferenceTestCase
8+ class LooseConstComparisonPhp7Test extends TypeInferenceTestCase
99{
1010
1111/**
@@ -16,8 +16,6 @@ public static function dataFileAsserts(): iterable
1616// compares constants according to the php-version phpstan configuration,
1717// _NOT_ the current php runtime version
1818yield from self ::gatherAssertTypes (__DIR__ . '/data/loose-const-comparison-php7.php ' );
19-
20- yield from self ::gatherAssertTypes (__DIR__ . '/data/bug-13129-php7.php ' );
2119}
2220
2321/**
Original file line number Diff line number Diff line change 55use PHPStan \Testing \TypeInferenceTestCase ;
66use PHPUnit \Framework \Attributes \DataProvider ;
77
8- class NodeScopeResolverPhp8Test extends TypeInferenceTestCase
8+ class LooseConstComparisonPhp8Test extends TypeInferenceTestCase
99{
1010
1111/**
@@ -16,8 +16,6 @@ public static function dataFileAsserts(): iterable
1616// compares constants according to the php-version phpstan configuration,
1717// _NOT_ the current php runtime version
1818yield from self ::gatherAssertTypes (__DIR__ . '/data/loose-const-comparison-php8.php ' );
19-
20- yield from self ::gatherAssertTypes (__DIR__ . '/data/bug-13129-php8.php ' );
2119}
2220
2321/**
Original file line number Diff line number Diff line change 1+ <?php declare (strict_types = 1 );
2+
3+ namespace PHPStan \Analyser ;
4+
5+ use PHPStan \Testing \TypeInferenceTestCase ;
6+ use PHPUnit \Framework \Attributes \DataProvider ;
7+
8+ class SubstrPhp7Test extends TypeInferenceTestCase
9+ {
10+
11+ /**
12+ * @return iterable<array<string, mixed[]>>
13+ */
14+ public static function dataFileAsserts (): iterable
15+ {
16+ yield from self ::gatherAssertTypes (__DIR__ . '/data/bug-13129-php7.php ' );
17+ }
18+
19+ /**
20+ * @param mixed ...$args
21+ */
22+ #[DataProvider('dataFileAsserts ' )]
23+ public function testFileAsserts (
24+ string $ assertType ,
25+ string $ file ,
26+ ...$ args ,
27+ ): void
28+ {
29+ $ this ->assertFileAsserts ($ assertType , $ file , ...$ args );
30+ }
31+
32+ public static function getAdditionalConfigFiles (): array
33+ {
34+ return [
35+ __DIR__ . '/nodeScopeResolverPhp7.neon ' ,
36+ ];
37+ }
38+
39+ }
Original file line number Diff line number Diff line change 1+ <?php declare (strict_types = 1 );
2+
3+ namespace PHPStan \Analyser ;
4+
5+ use PHPStan \Testing \TypeInferenceTestCase ;
6+ use PHPUnit \Framework \Attributes \DataProvider ;
7+
8+ class SubstrPhp8Test extends TypeInferenceTestCase
9+ {
10+
11+ /**
12+ * @return iterable<array<string, mixed[]>>
13+ */
14+ public static function dataFileAsserts (): iterable
15+ {
16+ yield from self ::gatherAssertTypes (__DIR__ . '/data/bug-13129-php8.php ' );
17+ }
18+
19+ /**
20+ * @param mixed ...$args
21+ */
22+ #[DataProvider('dataFileAsserts ' )]
23+ public function testFileAsserts (
24+ string $ assertType ,
25+ string $ file ,
26+ ...$ args ,
27+ ): void
28+ {
29+ $ this ->assertFileAsserts ($ assertType , $ file , ...$ args );
30+ }
31+
32+ public static function getAdditionalConfigFiles (): array
33+ {
34+ return [
35+ __DIR__ . '/nodeScopeResolverPhp8.neon ' ,
36+ ];
37+ }
38+
39+ }
You can’t perform that action at this time.
0 commit comments