Fix Display\ResultsTest test on Windows
[phpmyadmin.git] / test / classes / MimeTest.php
blobbe0e191d145274b26904f1bea2f76e186ebf8b2c
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * tests for PhpMyAdmin\Mime
6 * @package PhpMyAdmin-test
7 */
8 declare(strict_types=1);
10 namespace PhpMyAdmin\Tests;
12 use PhpMyAdmin\Mime;
13 use PHPUnit\Framework\TestCase;
15 /**
16 * Test for mime detection.
18 * @package PhpMyAdmin-test
20 class MimeTest extends TestCase
22 /**
23 * Test for Mime::detect
25 * @param string $test MIME to test
26 * @param string $output Expected output
28 * @return void
29 * @dataProvider providerForTestDetect
31 public function testDetect($test, $output): void
34 $this->assertEquals(
35 Mime::detect($test),
36 $output
40 /**
41 * Provider for testDetect
43 * @return array data for testDetect
45 public function providerForTestDetect()
47 return [
49 'pma',
50 'application/octet-stream',
53 'GIF',
54 'image/gif',
57 "\x89PNG",
58 'image/png',
61 chr(0xff) . chr(0xd8),
62 'image/jpeg',