33namespace TH \Maybe \Tests \Unit \Option ;
44
55use PHPUnit \Framework \Assert ;
6+ use PHPUnit \Framework \Attributes \DataProvider ;
67use PHPUnit \Framework \TestCase ;
78use TH \Maybe \Option ;
89use TH \Maybe \Tests \Provider ;
@@ -12,24 +13,24 @@ final class BooleanTest extends TestCase
1213 use Provider \Options;
1314
1415 /**
15- * @dataProvider andMatrix
1616 * @template T
1717 * @param Option<T> $left
1818 * @param Option<T> $right
1919 * @param Option<T> $expected
20- */
20+ */
21+ #[DataProvider('andMatrix ' )]
2122 public function testAnd (Option $ left , Option $ right , Option $ expected ): void
2223 {
2324 Assert::assertSame ($ expected , $ left ->and ($ right ));
2425 }
2526
2627 /**
27- * @dataProvider andMatrix
2828 * @template T
2929 * @param Option<T> $left
3030 * @param Option<T> $right
3131 * @param Option<T> $expected
32- */
32+ */
33+ #[DataProvider('andMatrix ' )]
3334 public function testAndThen (Option $ left , Option $ right , Option $ expected ): void
3435 {
3536 $ calls = [];
@@ -47,12 +48,12 @@ public function testAndThen(Option $left, Option $right, Option $expected): void
4748 }
4849
4950 /**
50- * @dataProvider orMatrix
5151 * @template T
5252 * @param Option<T> $left
5353 * @param Option<T> $right
5454 * @param Option<T> $expected
55- */
55+ */
56+ #[DataProvider('orMatrix ' )]
5657 public function testOrElse (Option $ left , Option $ right , Option $ expected ): void
5758 {
5859 $ calls = 0 ;
@@ -70,24 +71,24 @@ public function testOrElse(Option $left, Option $right, Option $expected): void
7071 }
7172
7273 /**
73- * @dataProvider orMatrix
7474 * @template T
7575 * @param Option<T> $left
7676 * @param Option<T> $right
7777 * @param Option<T> $expected
78- */
78+ */
79+ #[DataProvider('orMatrix ' )]
7980 public function testOr (Option $ left , Option $ right , Option $ expected ): void
8081 {
8182 Assert::assertSame ($ expected , $ left ->or ($ right ));
8283 }
8384
8485 /**
85- * @dataProvider xorMatrix
8686 * @template T
8787 * @param Option<T> $left
8888 * @param Option<T> $right
8989 * @param Option<T> $expected
90- */
90+ */
91+ #[DataProvider('xorMatrix ' )]
9192 public function testXor (Option $ left , Option $ right , Option $ expected ): void
9293 {
9394 Assert::assertEquals ($ expected , $ left ->xor ($ right ));
0 commit comments