5
5
namespace Doctrine \Tests \Common \Lexer ;
6
6
7
7
use Doctrine \Common \Lexer \Token ;
8
+ use PHPUnit \Framework \Attributes \DataProvider ;
8
9
use PHPUnit \Framework \TestCase ;
9
10
10
11
use function array_map ;
@@ -82,11 +83,8 @@ public function testResetPosition(): void
82
83
$ this ->assertEquals ($ expectedTokens [0 ], $ this ->concreteLexer ->lookahead );
83
84
}
84
85
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 ' )]
90
88
public function testMoveNext (string $ input , array $ expectedTokens ): void
91
89
{
92
90
$ this ->concreteLexer ->setInput ($ input );
@@ -126,11 +124,8 @@ public function testUtf8Mismatch(): void
126
124
);
127
125
}
128
126
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 ' )]
134
129
public function testPeek (string $ input , array $ expectedTokens ): void
135
130
{
136
131
$ this ->concreteLexer ->setInput ($ input );
@@ -146,11 +141,8 @@ public function testPeek(string $input, array $expectedTokens): void
146
141
$ this ->assertNull ($ this ->concreteLexer ->peek ());
147
142
}
148
143
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 ' )]
154
146
public function testGlimpse (string $ input , array $ expectedTokens ): void
155
147
{
156
148
$ this ->concreteLexer ->setInput ($ input );
@@ -177,7 +169,7 @@ public static function inputUntilPositionDataProvider(): array
177
169
];
178
170
}
179
171
180
- /** @dataProvider inputUntilPositionDataProvider */
172
+ #[DataProvider( ' inputUntilPositionDataProvider ' )]
181
173
public function testGetInputUntilPosition (
182
174
string $ input ,
183
175
int $ position ,
@@ -188,11 +180,8 @@ public function testGetInputUntilPosition(
188
180
$ this ->assertSame ($ expectedInput , $ this ->concreteLexer ->getInputUntilPosition ($ position ));
189
181
}
190
182
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 ' )]
196
185
public function testIsNextToken (string $ input , array $ expectedTokens ): void
197
186
{
198
187
$ this ->concreteLexer ->setInput ($ input );
@@ -205,11 +194,8 @@ public function testIsNextToken(string $input, array $expectedTokens): void
205
194
}
206
195
}
207
196
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 ' )]
213
199
public function testIsNextTokenAny (string $ input , array $ expectedTokens ): void
214
200
{
215
201
$ allTokenTypes = array_map (static function ($ token ): string {
0 commit comments