Skip to content

Commit e8ce8e2

Browse files
committedMar 24, 2025
Use DataProvider attribute
1 parent 574ab60 commit e8ce8e2

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed
 

‎phpstan.neon

+5
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,8 @@ includes:
99
parameters:
1010
excludePaths:
1111
- tests/*/data/*
12+
ignoreErrors:
13+
-
14+
message: '#^Attribute class PHPUnit\\Framework\\Attributes\\DataProvider does not exist\.$#'
15+
identifier: attribute.notFound
16+
reportUnmatched: false

‎tests/Type/PHPUnit/AssertFunctionTypeSpecifyingExtensionTest.php

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace PHPStan\Type\PHPUnit;
44

55
use PHPStan\Testing\TypeInferenceTestCase;
6+
use PHPUnit\Framework\Attributes\DataProvider;
67
use function function_exists;
78

89
class AssertFunctionTypeSpecifyingExtensionTest extends TypeInferenceTestCase
@@ -26,6 +27,7 @@ public static function dataFileAsserts(): iterable
2627
* @dataProvider dataFileAsserts
2728
* @param mixed ...$args
2829
*/
30+
#[DataProvider('dataFileAsserts')]
2931
public function testFileAsserts(
3032
string $assertType,
3133
string $file,

‎tests/Type/PHPUnit/AssertMethodTypeSpecifyingExtensionTest.php

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace PHPStan\Type\PHPUnit;
44

55
use PHPStan\Testing\TypeInferenceTestCase;
6+
use PHPUnit\Framework\Attributes\DataProvider;
67

78
class AssertMethodTypeSpecifyingExtensionTest extends TypeInferenceTestCase
89
{
@@ -17,6 +18,7 @@ public static function dataFileAsserts(): iterable
1718
* @dataProvider dataFileAsserts
1819
* @param mixed ...$args
1920
*/
21+
#[DataProvider('dataFileAsserts')]
2022
public function testFileAsserts(
2123
string $assertType,
2224
string $file,

0 commit comments

Comments
 (0)
Please sign in to comment.