55namespace Doctrine \Tests \Common \Lexer ;
66
77use Doctrine \Common \Lexer \Token ;
8+ use PHPUnit \Framework \Attributes \DataProvider ;
89use PHPUnit \Framework \TestCase ;
910
1011use function array_map ;
@@ -82,11 +83,8 @@ public function testResetPosition(): void
8283 $ this ->assertEquals ($ expectedTokens [0 ], $ this ->concreteLexer ->lookahead );
8384 }
8485
85- /**
86- * @psalm-param list<Token<string, string|int>> $expectedTokens
87- *
88- * @dataProvider dataProvider
89- */
86+ /** @psalm-param list<Token<string, string|int>> $expectedTokens */
87+ #[DataProvider('dataProvider ' )]
9088 public function testMoveNext (string $ input , array $ expectedTokens ): void
9189 {
9290 $ this ->concreteLexer ->setInput ($ input );
@@ -126,11 +124,8 @@ public function testUtf8Mismatch(): void
126124 );
127125 }
128126
129- /**
130- * @psalm-param list<Token<string, string|int>> $expectedTokens
131- *
132- * @dataProvider dataProvider
133- */
127+ /** @psalm-param list<Token<string, string|int>> $expectedTokens */
128+ #[DataProvider('dataProvider ' )]
134129 public function testPeek (string $ input , array $ expectedTokens ): void
135130 {
136131 $ this ->concreteLexer ->setInput ($ input );
@@ -146,11 +141,8 @@ public function testPeek(string $input, array $expectedTokens): void
146141 $ this ->assertNull ($ this ->concreteLexer ->peek ());
147142 }
148143
149- /**
150- * @psalm-param list<Token<string, string|int>> $expectedTokens
151- *
152- * @dataProvider dataProvider
153- */
144+ /** @psalm-param list<Token<string, string|int>> $expectedTokens */
145+ #[DataProvider('dataProvider ' )]
154146 public function testGlimpse (string $ input , array $ expectedTokens ): void
155147 {
156148 $ this ->concreteLexer ->setInput ($ input );
@@ -177,7 +169,7 @@ public static function inputUntilPositionDataProvider(): array
177169 ];
178170 }
179171
180- /** @dataProvider inputUntilPositionDataProvider */
172+ #[DataProvider( ' inputUntilPositionDataProvider ' )]
181173 public function testGetInputUntilPosition (
182174 string $ input ,
183175 int $ position ,
@@ -188,11 +180,8 @@ public function testGetInputUntilPosition(
188180 $ this ->assertSame ($ expectedInput , $ this ->concreteLexer ->getInputUntilPosition ($ position ));
189181 }
190182
191- /**
192- * @psalm-param list<Token<string, string|int>> $expectedTokens
193- *
194- * @dataProvider dataProvider
195- */
183+ /** @psalm-param list<Token<string, string|int>> $expectedTokens */
184+ #[DataProvider('dataProvider ' )]
196185 public function testIsNextToken (string $ input , array $ expectedTokens ): void
197186 {
198187 $ this ->concreteLexer ->setInput ($ input );
@@ -205,11 +194,8 @@ public function testIsNextToken(string $input, array $expectedTokens): void
205194 }
206195 }
207196
208- /**
209- * @psalm-param list<Token<string, string|int>> $expectedTokens
210- *
211- * @dataProvider dataProvider
212- */
197+ /** @psalm-param list<Token<string, string|int>> $expectedTokens */
198+ #[DataProvider('dataProvider ' )]
213199 public function testIsNextTokenAny (string $ input , array $ expectedTokens ): void
214200 {
215201 $ allTokenTypes = array_map (static function ($ token ): string {
0 commit comments