diff --git a/test/unit/TinyImageSizeTest.php b/test/unit/TinyImageSizeTest.php index c77213ad..5db46931 100644 --- a/test/unit/TinyImageSizeTest.php +++ b/test/unit/TinyImageSizeTest.php @@ -194,8 +194,12 @@ public function test_resized_should_return_false_if_meta_have_output_and_not_res } public function test_will_read_mimetype_from_file() { - // because files in the virtual file system are not really files but empty strings, it is a text/plain. - $this->assertEquals( $this->original->mimetype(), 'text/plain'); + // vfs files are empty buffers + // empty buffers on php < 8 returns 'text/plain', > 8 is 'application/octet-stream' + $this->assertContains( + $this->original->mimetype(), + array( 'text/plain', 'application/octet-stream' ) + ); } /**