Skip to content

Commit ad7ba7e

Browse files
authored
Fix tests + yet another test (#40)
1 parent e214bdc commit ad7ba7e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

tests/Attribute/Parameter/UploadedFilesTest.php

+4
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public function testBase(): void
2828
'a' => $file1,
2929
'b' => $file2,
3030
'c' => $file3,
31+
'd' => [$file1, $file3],
3132
]);
3233

3334
$input = new class () {
@@ -37,13 +38,16 @@ public function testBase(): void
3738
public ?UploadedFileInterface $b = null;
3839
#[UploadedFiles]
3940
public ?UploadedFileInterface $c = null;
41+
#[UploadedFiles('d')]
42+
public array $array = [];
4043
};
4144

4245
$hydrator->hydrate($input);
4346

4447
$this->assertSame($file1, $input->a);
4548
$this->assertSame($file2, $input->b);
4649
$this->assertSame($file3, $input->c);
50+
$this->assertSame([$file1, $file3], $input->array);
4751
}
4852

4953
public function testWithoutBody(): void

tests/RequestInputParametersResolverTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public static function dataParameters(): array
6565
];
6666
}
6767

68-
#[DataProvider('dataparameters)]
68+
#[DataProvider('dataParameters')]
6969
public function testParameters(array $expected, Closure $closure): void
7070
{
7171
$request = $this->createMock(ServerRequestInterface::class);

0 commit comments

Comments
 (0)