From 99a5fd1544d4699b1d2a5db77ba4b7ad896a04a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pysiak?= Date: Tue, 29 Oct 2024 09:32:55 +0100 Subject: [PATCH] Skip svg sanitize test if package is not installed --- tests/Functional/ImageUploaderTest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/Functional/ImageUploaderTest.php b/tests/Functional/ImageUploaderTest.php index a5e0a1942a20..1594cdace387 100644 --- a/tests/Functional/ImageUploaderTest.php +++ b/tests/Functional/ImageUploaderTest.php @@ -28,6 +28,10 @@ final class ImageUploaderTest extends WebTestCase /** @test */ public function it_sanitizes_file_content_if_it_is_svg_mime_type(): void { + if (!class_exists(\enshrined\svgSanitize\Sanitizer::class)) { + $this->markTestSkipped('This test requires "enshrined/svg-sanitize" package to be installed.'); + } + self::$client = static::createClient(); $imageUploader = self::$kernel->getContainer()->get('sylius.image_uploader');