forked from wallabag/wallabag
Add some basic test
This commit is contained in:
@ -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;
|
||||
|
||||
@ -65,6 +65,7 @@ class DownloadImagesTest extends TestCase
|
||||
['image/jpeg', 'jpeg'],
|
||||
['image/png', 'png'],
|
||||
['image/gif', 'gif'],
|
||||
['image/webp', 'webp'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user