88use Chubbyphp \Mock \MockMethod \WithReturnSelf ;
99use Chubbyphp \Mock \MockObjectBuilder ;
1010use Chubbyphp \StaticFile \StaticFileMiddleware ;
11+ use PHPUnit \Framework \Attributes \DataProvider ;
1112use PHPUnit \Framework \TestCase ;
1213use Psr \Http \Message \ResponseFactoryInterface ;
1314use Psr \Http \Message \ResponseInterface ;
@@ -54,7 +55,7 @@ public function testIsNotReadable(): void
5455 self ::assertSame ($ response , $ middleware ->process ($ request , $ handler ));
5556 }
5657
57- public function testInvalidHashAlgorythm (): void
58+ public function testInvalidHashAlgorithm (): void
5859 {
5960 $ this ->expectException (\LogicException::class);
6061 $ this ->expectExceptionMessage ('Invalid or not supported hash algorithm: "unknown" ' );
@@ -73,9 +74,7 @@ public function testInvalidHashAlgorythm(): void
7374 new StaticFileMiddleware ($ responseFactory , $ streamFactory , $ publicDirectory , $ hashAlgorithm );
7475 }
7576
76- /**
77- * @dataProvider provideFiles
78- */
77+ #[DataProvider('provideFiles ' )]
7978 public function testIfMatch (string $ body , string $ contentLength , ?string $ contentType , string $ extension ): void
8079 {
8180 $ publicDirectory = sys_get_temp_dir ();
@@ -126,9 +125,7 @@ public function testIfMatch(string $body, string $contentLength, ?string $conten
126125 self ::assertSame ($ response , $ middleware ->process ($ request , $ handler ));
127126 }
128127
129- /**
130- * @dataProvider provideFiles
131- */
128+ #[DataProvider('provideFiles ' )]
132129 public function testIfMatchWithDefaultHashAlgorithm (
133130 string $ body ,
134131 string $ contentLength ,
@@ -182,9 +179,7 @@ public function testIfMatchWithDefaultHashAlgorithm(
182179 self ::assertSame ($ response , $ middleware ->process ($ request , $ handler ));
183180 }
184181
185- /**
186- * @dataProvider provideFiles
187- */
182+ #[DataProvider('provideFiles ' )]
188183 public function testIfNoneMatch (string $ body , string $ contentLength , ?string $ contentType , string $ extension ): void
189184 {
190185 $ publicDirectory = sys_get_temp_dir ();
0 commit comments