1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
From 485f75211335bfd69882bee7d3fccc730485aa82 Mon Sep 17 00:00:00 2001
From: Frank de Jonge <info@frenky.net>
Date: Mon, 21 Sep 2020 20:19:38 +0200
Subject: [PATCH] Assert start of string for SVG type, it varies based on PHP
version
---
src/FinfoMimeTypeDetectorTest.php | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/FinfoMimeTypeDetectorTest.php b/src/FinfoMimeTypeDetectorTest.php
index fadbe88..9f6c91b 100644
--- a/src/FinfoMimeTypeDetectorTest.php
+++ b/src/FinfoMimeTypeDetectorTest.php
@@ -38,7 +38,7 @@ public function detecting_mime_type_from_contents(): void
$mimeType = $this->detector->detectMimeType('flysystem.svg', $contents);
- $this->assertEquals('image/svg', $mimeType);
+ $this->assertStringStartsWith('image/svg', $mimeType);
}
/**
@@ -51,7 +51,7 @@ public function detecting_mime_type_from_buffer(): void
$mimeType = $this->detector->detectMimeTypeFromBuffer($contents);
- $this->assertEquals('image/svg', $mimeType);
+ $this->assertStringStartsWith('image/svg', $mimeType);
}
/**
@@ -61,7 +61,7 @@ public function detecting_from_contents_falls_back_to_extension_detection(): voi
{
$mimeType = $this->detector->detectMimeType('flysystem.svg', '');
- $this->assertEquals('image/svg+xml', $mimeType);
+ $this->assertStringStartsWith('image/svg+xml', $mimeType);
}
/**
|