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');
});
 ?>

Function Calls

None

Variables

None

Stats

MD5dddff74e669dfbf5dce073ae2b885ca1
Eval Count0
Decode Time77 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');
});