Learn more  » Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

jsarnowski / jsarnowski/brizy-pro   php

Repository URL to install this package:

Version: 2.3.7 

/ guzzlehttp / psr7 / tests / MimeTypeTest.php

<?php

namespace GuzzleHttp\Tests\Psr7;

use GuzzleHttp\Psr7;

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

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