![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/medad.corals.io/vendor/spatie/laravel-medialibrary/src/MediaCollections/ |
<?php namespace Spatie\MediaLibrary\MediaCollections; use Spatie\MediaLibrary\Support\File; use Spatie\MediaLibrary\Tests\TestCase; class FileTest extends TestCase { /** @test */ public function it_can_determine_a_human_readable_filesize() { $this->assertEquals('10 B', File::getHumanReadableSize(10)); $this->assertEquals('100 B', File::getHumanReadableSize(100)); $this->assertEquals('1000 B', File::getHumanReadableSize(1000)); $this->assertEquals('9.77 KB', File::getHumanReadableSize(10000)); $this->assertEquals('976.56 KB', File::getHumanReadableSize(1000000)); $this->assertEquals('9.54 MB', File::getHumanReadableSize(10000000)); $this->assertEquals('9.31 GB', File::getHumanReadableSize(10000000000)); } /** @test */ public function it_can_determine_the_mime_type_of_a_file() { $this->assertEquals('text/x-php', File::getMimeType(__FILE__)); } }