getDocumentTypeDetector example

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

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

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

        static::assertNull($type);
    }

    public function testDetectWebp(): void
    {
        $type = $this->getDocumentTypeDetector()->detect(
            $this->createMediaFile(__DIR__ . '/../fixtures/shopware-logo.vp8x.webp'),
            
Home | Imprint | This part of the site doesn't use cookies.