File: MimeTypeTest.php

package info (click to toggle)
php-guzzlehttp-psr7 1.7.0-1%2Bdeb11u2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 780 kB
  • sloc: php: 7,816; makefile: 37
file content (22 lines) | stat: -rw-r--r-- 529 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php

namespace GuzzleHttp\Tests\Psr7;

use GuzzleHttp\Psr7;

class MimeTypeTestTest extends BaseTest
{
    public function testDetermineFromExtension()
    {
        $this->assertNull(Psr7\MimeType::fromExtension('not-a-real-extension'));
        $this->assertSame('application/json', Psr7\MimeType::fromExtension('json'));
    }

    public function testDetermineFromFilename()
    {
        $this->assertSame(
            'image/jpeg',
            Psr7\MimeType::fromFilename('/tmp/images/IMG034821.JPEG')
        );
    }
}