12
12
use MongoDB \Operation \FindOneAndReplace ;
13
13
use MongoDB \Tests \Fixtures \Codec \TestDocumentCodec ;
14
14
use MongoDB \Tests \Fixtures \Document \TestObject ;
15
+ use PHPUnit \Framework \Attributes \DataProvider ;
15
16
16
17
class CodecCollectionFunctionalTest extends FunctionalTestCase
17
18
{
@@ -54,7 +55,7 @@ public static function provideAggregateOptions(): Generator
54
55
];
55
56
}
56
57
57
- /** @dataProvider provideAggregateOptions */
58
+ #[DataProvider( ' provideAggregateOptions ' )]
58
59
public function testAggregate ($ expected , $ options ): void
59
60
{
60
61
$ this ->createFixtures (3 );
@@ -114,7 +115,7 @@ public static function provideBulkWriteOptions(): Generator
114
115
];
115
116
}
116
117
117
- /** @dataProvider provideBulkWriteOptions */
118
+ #[DataProvider( ' provideBulkWriteOptions ' )]
118
119
public function testBulkWrite ($ expected , $ options ): void
119
120
{
120
121
$ this ->createFixtures (3 );
@@ -169,7 +170,7 @@ public static function provideFindOneAndModifyOptions(): Generator
169
170
];
170
171
}
171
172
172
- /** @dataProvider provideFindOneAndModifyOptions */
173
+ #[DataProvider( ' provideFindOneAndModifyOptions ' )]
173
174
public function testFindOneAndDelete ($ expected , $ options ): void
174
175
{
175
176
$ this ->createFixtures (1 );
@@ -190,7 +191,7 @@ public function testFindOneAndDeleteWithCodecAndTypemap(): void
190
191
$ this ->collection ->findOneAndDelete (['_id ' => 1 ], $ options );
191
192
}
192
193
193
- /** @dataProvider provideFindOneAndModifyOptions */
194
+ #[DataProvider( ' provideFindOneAndModifyOptions ' )]
194
195
public function testFindOneAndUpdate ($ expected , $ options ): void
195
196
{
196
197
$ this ->createFixtures (1 );
@@ -235,7 +236,7 @@ public static function provideFindOneAndReplaceOptions(): Generator
235
236
];
236
237
}
237
238
238
- /** @dataProvider provideFindOneAndReplaceOptions */
239
+ #[DataProvider( ' provideFindOneAndReplaceOptions ' )]
239
240
public function testFindOneAndReplace ($ expected , $ options ): void
240
241
{
241
242
$ this ->createFixtures (1 );
@@ -293,7 +294,7 @@ public static function provideFindOptions(): Generator
293
294
];
294
295
}
295
296
296
- /** @dataProvider provideFindOptions */
297
+ #[DataProvider( ' provideFindOptions ' )]
297
298
public function testFind ($ expected , $ options ): void
298
299
{
299
300
$ this ->createFixtures (3 );
@@ -332,7 +333,7 @@ public static function provideFindOneOptions(): Generator
332
333
];
333
334
}
334
335
335
- /** @dataProvider provideFindOneOptions */
336
+ #[DataProvider( ' provideFindOneOptions ' )]
336
337
public function testFindOne ($ expected , $ options ): void
337
338
{
338
339
$ this ->createFixtures (1 );
@@ -383,7 +384,7 @@ public static function provideInsertManyOptions(): Generator
383
384
];
384
385
}
385
386
386
- /** @dataProvider provideInsertManyOptions */
387
+ #[DataProvider( ' provideInsertManyOptions ' )]
387
388
public function testInsertMany ($ expected , $ options ): void
388
389
{
389
390
$ documents = [
@@ -430,7 +431,7 @@ public static function provideInsertOneOptions(): Generator
430
431
];
431
432
}
432
433
433
- /** @dataProvider provideInsertOneOptions */
434
+ #[DataProvider( ' provideInsertOneOptions ' )]
434
435
public function testInsertOne ($ expected , $ options ): void
435
436
{
436
437
$ result = $ this ->collection ->insertOne (TestObject::createForFixture (1 ), $ options );
@@ -475,7 +476,7 @@ public static function provideReplaceOneOptions(): Generator
475
476
];
476
477
}
477
478
478
- /** @dataProvider provideReplaceOneOptions */
479
+ #[DataProvider( ' provideReplaceOneOptions ' )]
479
480
public function testReplaceOne ($ expected , $ options ): void
480
481
{
481
482
$ this ->createFixtures (1 );
0 commit comments