Add some basic test

This commit is contained in:
Jeremy Benoist 2022-03-21 21:26:30 +01:00
parent 1b9e1d4886
commit 0049ef390b
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C
2 changed files with 2 additions and 1 deletions

View file

@ -351,7 +351,7 @@ class DownloadImages
$this->logger->debug('DownloadImages: Checking extension (alternative)', ['ext' => $ext]);
}
if (!\in_array($ext, ['jpeg', 'jpg', 'gif', 'png','webp'], true)) {
if (!\in_array($ext, ['jpeg', 'jpg', 'gif', 'png', 'webp'], true)) {
$this->logger->error('DownloadImages: Processed image with not allowed extension. Skipping: ' . $imagePath);
return false;

View file

@ -65,6 +65,7 @@ class DownloadImagesTest extends TestCase
['image/jpeg', 'jpeg'],
['image/png', 'png'],
['image/gif', 'gif'],
['image/webp', 'webp'],
];
}