From dcf30d8b446cda539d085ccf98cf3c0827ae5366 Mon Sep 17 00:00:00 2001 From: tijmen Date: Mon, 27 Jul 2026 10:14:24 +0200 Subject: [PATCH] fix php 8 test --- test/unit/TinyImageSizeTest.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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' ) + ); } /**