Decoded Output
Download<?php
use Spatie\MediaLibrary\Conversions\ImageGenerators\Avif;
it('can convert a avif', function () {
$imageGenerator = new Avif;
if (! $imageGenerator->requirementsAreInstalled()) {
$this->markTestSkipped('Skipping avif test because requirements to run it are not met');
}
$media = $this->testModelWithoutMediaConversions->addMedia($this->getTestAvif())->toMediaCollection();
expect($imageGenerator->canConvert($media))->toBeTrue();
$imageFile = $imageGenerator->convert($media->getPath());
expect(mime_content_type($imageFile))->toEqual('image/png');
});
?>
Did this file decode correctly?
How would you describe this file?
Thank you for your feedback! This will help us detect malicious PHP files more accurately in the future.
Function Calls
None
Variables
None
Stats
| MD5 | dddff74e669dfbf5 |
|---|---|
| Eval Count | 0 |
| Decode Time | 77 ms |
Original Code
<?php
use Spatie\MediaLibrary\Conversions\ImageGenerators\Avif;
it('can convert a avif', function () {
$imageGenerator = new Avif;
if (! $imageGenerator->requirementsAreInstalled()) {
$this->markTestSkipped('Skipping avif test because requirements to run it are not met');
}
$media = $this->testModelWithoutMediaConversions->addMedia($this->getTestAvif())->toMediaCollection();
expect($imageGenerator->canConvert($media))->toBeTrue();
$imageFile = $imageGenerator->convert($media->getPath());
expect(mime_content_type($imageFile))->toEqual('image/png');
});