Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions test/unit/TinyImageSizeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' )
);
}

/**
Expand Down
Loading