Skip to content

Commit

Permalink
Fix tests + yet another test (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
vjik committed Apr 25, 2024
1 parent e214bdc commit ad7ba7e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions tests/Attribute/Parameter/UploadedFilesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public function testBase(): void
'a' => $file1,
'b' => $file2,
'c' => $file3,
'd' => [$file1, $file3],
]);

$input = new class () {
Expand All @@ -37,13 +38,16 @@ public function testBase(): void
public ?UploadedFileInterface $b = null;
#[UploadedFiles]
public ?UploadedFileInterface $c = null;
#[UploadedFiles('d')]
public array $array = [];
};

$hydrator->hydrate($input);

$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
Expand Down
2 changes: 1 addition & 1 deletion tests/RequestInputParametersResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ad7ba7e

Please sign in to comment.