add binary driver for images, videos and other binary files
Closed this issue · 4 comments
Gummibeer commented
Hey,
I have some controller actions returning authorization protected binary files (image, video) or runtime generated binary content (image, zip).
It would be cool if there would be a BinaryDriver
which accepts the wanted extension as construct argument. So I would be able to do this:
$this->assertMatchesBinarySnapshot($image, 'jpg');
And it matches with Test__test_image__1.jpg
snapshot file.
fgilio commented
This would be pretty handy
freekmurze commented
We'd accept a PR that adds this 👍
Gummibeer commented
I'm on it - just waited for the go. 🚀
Gummibeer commented
After digging through current source I've found that assertMatchesFileSnapshot($file)
does exactly this.
So I will close this issue because it's already implemented.