|
2 | 2 |
|
3 | 3 | namespace Vich\UploaderBundle\Tests\Handler; |
4 | 4 |
|
| 5 | +use PHPUnit\Framework\Attributes\DataProvider; |
5 | 6 | use PHPUnit\Framework\MockObject\MockObject; |
6 | 7 | use Symfony\Component\HttpFoundation\StreamedResponse; |
7 | 8 | use Vich\TestBundle\Entity\Product; |
@@ -51,9 +52,7 @@ public static function filenamesProvider(): array |
51 | 52 | ]; |
52 | 53 | } |
53 | 54 |
|
54 | | - /** |
55 | | - * @dataProvider filenamesProvider |
56 | | - */ |
| 55 | + #[DataProvider('filenamesProvider')] |
57 | 56 | public function testDownloadObject(string $fileName, string $expectedFileName, ?string $expectedFallbackFilename): void |
58 | 57 | { |
59 | 58 | $file = $this->getUploadedFileMock(); |
@@ -90,9 +89,7 @@ public function testDownloadObject(string $fileName, string $expectedFileName, ? |
90 | 89 | ); |
91 | 90 | } |
92 | 91 |
|
93 | | - /** |
94 | | - * @dataProvider filenamesProvider |
95 | | - */ |
| 92 | + #[DataProvider('filenamesProvider')] |
96 | 93 | public function testDisplayObject(string $fileName, string $expectedFileName, ?string $expectedFallbackFilename): void |
97 | 94 | { |
98 | 95 | $file = $this->getUploadedFileMock(); |
@@ -129,9 +126,7 @@ public function testDisplayObject(string $fileName, string $expectedFileName, ?s |
129 | 126 | ); |
130 | 127 | } |
131 | 128 |
|
132 | | - /** |
133 | | - * @dataProvider filenamesProvider |
134 | | - */ |
| 129 | + #[DataProvider('filenamesProvider')] |
135 | 130 | public function testDownloadObjectWithoutFile(string $fileName, string $expectedFileName, ?string $expectedFallbackFilename): void |
136 | 131 | { |
137 | 132 | $this->mapping |
|
0 commit comments