private function createImageFactory($resizer = null, $imagine = null, $imagineSvg = null, $filesystem = null, $framework = null, $bypassCache = null, $imagineOptions = null, $validExtensions = null)
{
if (null === $resizer) {
$resizer = $this->getMockBuilder('Contao\\Image\\Resizer')->disableOriginalConstructor()->getMock();
}
if (null === $imagine) {
$imagine = $this->getMock('Imagine\\Image\\ImagineInterface');
}
if (null === $imagineSvg) {
$imagineSvg = $this->getMock('Imagine\\Image\\ImagineInterface');
}
if (null === $filesystem) {
$filesystem = new Filesystem();
}
if (null === $framework) {
$framework = $this->getMock('Contao\\CoreBundle\\Framework\\ContaoFrameworkInterface');
}
if (null === $bypassCache) {
$bypassCache = false;
}
if (null === $imagineOptions) {
$imagineOptions = ['jpeg_quality' => 80, 'interlace' => ImageInterface::INTERLACE_PLANE];
}
if (null === $validExtensions) {
$validExtensions = ['jpg', 'svg'];
}
return new ImageFactory($resizer, $imagine, $imagineSvg, $filesystem, $framework, $bypassCache, $imagineOptions, $validExtensions);
}