$errors[]=$this->t('The resized image is too small. The minimum dimensions are %dimensions pixels and after resizing, the image size will be %widthx%height pixels.',
[
'%dimensions'=>$minimum_dimensions,
'%width'=>$image->getWidth(),
'%height'=>$image->getHeight(),
]);
}
else{
$errors[]=$this->t('The image is too small. The minimum dimensions are %dimensions pixels and the image size is %widthx%height pixels.',
[
'%dimensions'=>$minimum_dimensions,
'%width'=>$image->getWidth(),
'%height'=>$image->getHeight(),
]);
}
}
}
}
return$errors;
}
/**
* Prepares the filename to strip out any malicious extensions.
'The image is too small. The minimum dimensions are <em class="placeholder">15x15</em> pixels and the image size is <em class="placeholder">10</em>x<em class="placeholder">10</em> pixels.',
$violations[0]['message']
);
}
/**
* Tests that the uploaded file extension is renamed to txt.
*/
@@ -205,6 +255,7 @@ class UploadFileServiceTest extends GraphQLTestBase {
\Drupal::service('config.factory'),
\Drupal::service('renderer'),
\Drupal::service('event_dispatcher'),
\Drupal::service('image.factory'),
);
// Create a Symfony dummy uploaded file in test mode.