From 08fbef9ef54b36afb3c96e18d861cbcfc5ab6844 Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Thu, 25 Apr 2024 11:45:26 +0300 Subject: [PATCH 1/2] fix tests --- tests/RequestInputParametersResolverTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); From c078a76016e703e91b6677f8e14c8c0c272900b4 Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Thu, 25 Apr 2024 11:48:46 +0300 Subject: [PATCH 2/2] more tests --- tests/Attribute/Parameter/UploadedFilesTest.php | 4 ++++ 1 file changed, 4 insertions(+) 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