scratch – Blame information for rev
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
87 | office | 1 | <?php |
2 | |||
3 | namespace GuzzleHttp\Tests; |
||
4 | |||
5 | use GuzzleHttp\Mimetypes; |
||
6 | |||
7 | /** |
||
8 | * @covers GuzzleHttp\Mimetypes |
||
9 | */ |
||
10 | class MimetypesTest extends \PHPUnit_Framework_TestCase |
||
11 | { |
||
12 | public function testGetsFromExtension() |
||
13 | { |
||
14 | $this->assertEquals('text/x-php', Mimetypes::getInstance()->fromExtension('php')); |
||
15 | } |
||
16 | |||
17 | public function testGetsFromFilename() |
||
18 | { |
||
19 | $this->assertEquals('text/x-php', Mimetypes::getInstance()->fromFilename(__FILE__)); |
||
20 | } |
||
21 | |||
22 | public function testGetsFromCaseInsensitiveFilename() |
||
23 | { |
||
24 | $this->assertEquals('text/x-php', Mimetypes::getInstance()->fromFilename(strtoupper(__FILE__))); |
||
25 | } |
||
26 | |||
27 | public function testReturnsNullWhenNoMatchFound() |
||
28 | { |
||
29 | $this->assertNull(Mimetypes::getInstance()->fromExtension('foobar')); |
||
30 | } |
||
31 | } |