1111
1212namespace Symfony \UX \Turbo \Tests \Helper ;
1313
14+ use PHPUnit \Framework \Attributes \DataProvider ;
15+ use PHPUnit \Framework \Attributes \TestWith ;
1416use PHPUnit \Framework \TestCase ;
1517use Symfony \UX \Turbo \Helper \TurboStream ;
1618
1719class TurboStreamTest extends TestCase
1820{
19- /**
20- * @testWith ["append"]
21- * ["prepend"]
22- * ["replace"]
23- * ["update"]
24- * ["before"]
25- * ["after"]
26- */
21+ #[TestWith(['append ' ])]
22+ #[TestWith(['prepend ' ])]
23+ #[TestWith(['replace ' ])]
24+ #[TestWith(['update ' ])]
25+ #[TestWith(['before ' ])]
26+ #[TestWith(['after ' ])]
2727 public function testStream (string $ action )
2828 {
2929 $ this ->assertSame (<<<EOHTML
@@ -35,10 +35,8 @@ public function testStream(string $action)
3535 );
3636 }
3737
38- /**
39- * @testWith ["replace"]
40- * ["update"]
41- */
38+ #[TestWith(['replace ' ])]
39+ #[TestWith(['update ' ])]
4240 public function testStreamMorph (string $ action )
4341 {
4442 $ this ->assertSame (<<<EOHTML
@@ -89,10 +87,9 @@ public function testCustom()
8987 }
9088
9189 /**
92- * @dataProvider customThrowsExceptionDataProvider
93- *
9490 * @param array<string, string|int|float|null> $attr
9591 */
92+ #[DataProvider('customThrowsExceptionDataProvider ' )]
9693 public function testCustomThrowsException (string $ action , string $ target , string $ html , array $ attr )
9794 {
9895 $ this ->expectException (\InvalidArgumentException::class);
0 commit comments