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 5
5
use PHPStan \Testing \TypeInferenceTestCase ;
6
6
use PHPUnit \Framework \Attributes \DataProvider ;
7
7
8
- class NodeScopeResolverPhp7Test extends TypeInferenceTestCase
8
+ class LooseConstComparisonPhp7Test extends TypeInferenceTestCase
9
9
{
10
10
11
11
/**
@@ -16,8 +16,6 @@ public static function dataFileAsserts(): iterable
16
16
// compares constants according to the php-version phpstan configuration,
17
17
// _NOT_ the current php runtime version
18
18
yield from self ::gatherAssertTypes (__DIR__ . '/data/loose-const-comparison-php7.php ' );
19
-
20
- yield from self ::gatherAssertTypes (__DIR__ . '/data/bug-13129-php7.php ' );
21
19
}
22
20
23
21
/**
Original file line number Diff line number Diff line change 5
5
use PHPStan \Testing \TypeInferenceTestCase ;
6
6
use PHPUnit \Framework \Attributes \DataProvider ;
7
7
8
- class NodeScopeResolverPhp8Test extends TypeInferenceTestCase
8
+ class LooseConstComparisonPhp8Test extends TypeInferenceTestCase
9
9
{
10
10
11
11
/**
@@ -16,8 +16,6 @@ public static function dataFileAsserts(): iterable
16
16
// compares constants according to the php-version phpstan configuration,
17
17
// _NOT_ the current php runtime version
18
18
yield from self ::gatherAssertTypes (__DIR__ . '/data/loose-const-comparison-php8.php ' );
19
-
20
- yield from self ::gatherAssertTypes (__DIR__ . '/data/bug-13129-php8.php ' );
21
19
}
22
20
23
21
/**
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