getImageTypeDetector example

use Shopware\Core\Framework\Test\TestCaseBase\IntegrationTestBehaviour;

/** * @internal */
class ImageTypeDetectorTest extends TestCase
{
    use IntegrationTestBehaviour;

    public function testDetectGif(): void
    {
        $type = $this->getImageTypeDetector()->detect(
            $this->createMediaFile(__DIR__ . '/../fixtures/logo.gif'),
            null
        );

        static::assertInstanceOf(ImageType::class$type);
        static::assertCount(1, $type->getFlags());
        static::assertTrue($type->is(ImageType::TRANSPARENT));
    }

    public function testDetectGifDoesNotOverwriteButAddsFlags(): void
    {
        
Home | Imprint | This part of the site doesn't use cookies.