|
6 | 6 | use Illuminate\Database\ConnectionResolver; |
7 | 7 | use Illuminate\Database\MySqlConnection; |
8 | 8 | use Illuminate\Support\Facades\DB; |
| 9 | +use PHPUnit\Framework\Attributes\CoversClass; |
| 10 | +use PHPUnit\Framework\Attributes\DataProvider; |
9 | 11 | use PHPUnit\Framework\TestCase; |
10 | 12 | use SimpleAsFuck\ApiToolkit\Model\Webhook\Params; |
11 | 13 | use SimpleAsFuck\ApiToolkit\Model\Webhook\Priority; |
12 | 14 | use SimpleAsFuck\ApiToolkit\Model\Webhook\Webhook; |
13 | 15 | use SimpleAsFuck\ApiToolkit\Service\Webhook\LaravelMysqlRepository; |
14 | 16 |
|
15 | | -/** |
16 | | - * @covers \SimpleAsFuck\ApiToolkit\Service\Webhook\LaravelMysqlRepository |
17 | | - */ |
| 17 | +#[CoversClass(LaravelMysqlRepository::class)] |
18 | 18 | final class LaravelMysqlRepositoryTest extends TestCase |
19 | 19 | { |
20 | 20 | private static ConnectionResolver $connectionResolver; |
@@ -61,12 +61,11 @@ public static function tearDownAfterClass(): void |
61 | 61 | } |
62 | 62 |
|
63 | 63 | /** |
64 | | - * @dataProvider dataProviderLoadForDispatching |
65 | | - * |
66 | 64 | * @param array<non-empty-string> $expectedUrls |
67 | 65 | * @param non-empty-string $type |
68 | 66 | * @param array<non-empty-string, non-empty-string> $attributes |
69 | 67 | */ |
| 68 | + #[DataProvider('dataProviderLoadForDispatching')] |
70 | 69 | public function testLoadForDispatching(array $expectedUrls, string $type, array $attributes): void |
71 | 70 | { |
72 | 71 | $repository = new LaravelMysqlRepository( |
@@ -159,10 +158,9 @@ public static function dataProviderLoadForDispatching(): array |
159 | 158 | } |
160 | 159 |
|
161 | 160 | /** |
162 | | - * @dataProvider dataProviderSaveAndDelete |
163 | | - * |
164 | 161 | * @param non-empty-string $type |
165 | 162 | */ |
| 163 | + #[DataProvider('dataProviderSaveAndDelete')] |
166 | 164 | public function testSave(string $type, Params $params): void |
167 | 165 | { |
168 | 166 | $repository = new LaravelMysqlRepository( |
@@ -208,10 +206,9 @@ public function testSave(string $type, Params $params): void |
208 | 206 | } |
209 | 207 |
|
210 | 208 | /** |
211 | | - * @dataProvider dataProviderSaveAndDelete |
212 | | - * |
213 | 209 | * @param non-empty-string $type |
214 | 210 | */ |
| 211 | + #[DataProvider('dataProviderSaveAndDelete')] |
215 | 212 | public function testDelete(string $type, Params $params): void |
216 | 213 | { |
217 | 214 | $connection = self::$connectionResolver->connection('default'); |
|
0 commit comments