diff --git a/tests/Attribute/Parameter/UploadedFilesTest.php b/tests/Attribute/Parameter/UploadedFilesTest.php index 087c033..00df0c3 100644 --- a/tests/Attribute/Parameter/UploadedFilesTest.php +++ b/tests/Attribute/Parameter/UploadedFilesTest.php @@ -28,6 +28,7 @@ public function testBase(): void 'a' => $file1, 'b' => $file2, 'c' => $file3, + 'd' => [$file1, $file3], ]); $input = new class () { @@ -37,6 +38,8 @@ public function testBase(): void public ?UploadedFileInterface $b = null; #[UploadedFiles] public ?UploadedFileInterface $c = null; + #[UploadedFiles('d')] + public array $array = []; }; $hydrator->hydrate($input); @@ -44,6 +47,7 @@ public function testBase(): void $this->assertSame($file1, $input->a); $this->assertSame($file2, $input->b); $this->assertSame($file3, $input->c); + $this->assertSame([$file1, $file3], $input->array); } public function testWithoutBody(): void diff --git a/tests/RequestInputParametersResolverTest.php b/tests/RequestInputParametersResolverTest.php index 6d0547c..ecd06c0 100644 --- a/tests/RequestInputParametersResolverTest.php +++ b/tests/RequestInputParametersResolverTest.php @@ -65,7 +65,7 @@ public static function dataParameters(): array ]; } - #[DataProvider('dataparameters)] + #[DataProvider('dataParameters')] public function testParameters(array $expected, Closure $closure): void { $request = $this->createMock(ServerRequestInterface::class);