/** * Test the getMimetype method */ public function testGetMimetype(){ $file0 = new \Core\Filestore\Backends\FileLocal('core/tests/updater-testdocument.txt'); $file1 = new \Core\Filestore\Backends\FileLocal('core/tests/ivak_TV_Test_Screen.png'); $file2 = new \Core\Filestore\Backends\FileLocal('core/tests/ivak_TV_Test_Screen.png.gz'); $file3 = new \Core\Filestore\Backends\FileLocal('core/tests/ivak_TV_Test_Screen.png.tar.gz'); $file4 = new \Core\Filestore\Backends\FileLocal('core/tests/ivak_TV_Test_Screen.png.zip'); $this->assertStringStartsWith('text/', $file0->getMimetype()); $this->assertEquals('image/png', $file1->getMimetype()); $this->assertEquals('application/x-gzip', $file2->getMimetype()); $this->assertStringStartsWith('application/x-gzip', $file3->getMimetype()); $this->assertStringStartsWith('application/zip', $file4->getMimetype()); }