public function testAdjustsTransformationParams($transformations, $index, $ratio, $expectedIndex, $expected)
{
$this->event->method('getArgument')->will($this->returnValueMap([['transformationIndex', $index], ['ratio', $ratio]]));
$this->request->expects($this->once())->method('getTransformations')->will($this->returnValue($transformations));
$this->request->expects($this->once())->method('setTransformations')->with($this->callback(function ($adjusted) use($expected, $expectedIndex) {
$diff = array_diff($adjusted[$expectedIndex]['params'], $expected);
return empty($diff);
}));
$this->listener->adjustImageTransformations($this->event);
}