This was built off the changes for required files checks.
Testing:
1 delete a theme's screenshot.png - run themesniffer
ensure that theme sniffer respects php check only settings by not sniffing this
ensure there's an error for missing screenshot.
2 add a large .png over the 1200x900 size restraint - run themesniffer
ensure that theme sniffer respects php check only settings by not sniffing this
ensure that theme sniffer throws error for being oversize restrictions and ouputs current dimensions for reference
3 add a screenshot.png file that would allow $mime_type to be false (either errors thrown when doing getimagesize, exif_imagetype, or invalid image mime type example: make a file called screenshot.png in cli ) - run themesniffer
ensure that theme sniffer respects php check only settings by not sniffing this
ensure that theme sniffer throws error for invalid mime type.
This adds validation on screenshot.png for valid mime type and dimensions from https://developer.wordpress.org/themes/release/required-theme-files/
This was built off the changes for required files checks.
Testing: 1 delete a theme's screenshot.png - run themesniffer
2 add a large .png over the 1200x900 size restraint - run themesniffer
3 add a screenshot.png file that would allow $mime_type to be false (either errors thrown when doing getimagesize, exif_imagetype, or invalid image mime type example: make a file called screenshot.png in cli ) - run themesniffer