public function testQueryDefaultValueArgument() { $payload =
new RequestPayload(50
);
$validator =
$this->
createMock(ValidatorInterface::
class);
$validator->
expects($this->
never()) ->
method('validate'
);
$resolver =
new RequestPayloadValueResolver(new Serializer(),
$validator);
$argument =
new ArgumentMetadata('valid', RequestPayload::
class, false, true,
$payload, false,
[ MapQueryString::
class => new MapQueryString(),
]);
$request = Request::
create('/', 'GET'
);
$kernel =
$this->
createMock(HttpKernelInterface::
class);
$arguments =
$resolver->
resolve($request,
$argument);
$event =
new ControllerArgumentsEvent($kernel,
fn () => null,
$arguments,
$request, HttpKernelInterface::MAIN_REQUEST
);
$resolver->
onKernelControllerArguments($event);
$this->
assertEquals([$payload],
$event->
getArguments());
}