Skip to content

Commit 1f36fc5

Browse files
committed
Use DataProvider attribute
1 parent bf031ae commit 1f36fc5

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)