$defaults =
[ RouteObjectInterface::ROUTE_OBJECT =>
$route,
] +
$raw_variables;
$expected =
$defaults;
$expected['id'
] = 'something_better!';
$expected['_raw_variables'
] =
new InputBag($raw_variables);
$this->paramConverterManager->
expects($this->
once()) ->
method('convert'
) ->
with($this->
isType('array'
)) ->
willReturn($expected);
$result =
$this->paramConversionEnhancer->
enhance($defaults,
new Request());
$this->
assertEquals($expected,
$result);
// Now run with the results as the new defaults to ensure that the
// conversion is just run once.
$result =
$this->paramConversionEnhancer->
enhance($result,
new Request());
$this->
assertEquals($expected,
$result);
}