3 declare(strict_types
=1);
5 namespace PhpMyAdmin\Tests
;
8 use PHPUnit\Framework\Attributes\CoversClass
;
9 use PHPUnit\Framework\Attributes\DataProvider
;
13 #[CoversClass(Mime::class)]
14 class MimeTest
extends AbstractTestCase
17 * Test for Mime::detect
19 * @param string $test MIME to test
20 * @param string $output Expected output
22 #[DataProvider('providerForTestDetect')]
23 public function testDetect(string $test, string $output): void
32 * Provider for testDetect
34 * @return mixed[] data for testDetect
36 public static function providerForTestDetect(): array
39 ['pma', 'application/octet-stream'],
41 ["\x89PNG", 'image/png'],
42 [chr(0xff) . chr(0xd8), 'image/jpeg'],