getTypeDetector example

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

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

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

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

    public function testDetectAnimatedGif(): void
    {
        $type = $this->getTypeDetector()->detect(
            
Home | Imprint | This part of the site doesn't use cookies.