public function testOtherFunctions() { $this->assertEquals(CopixFile::extractFileExt('file.ext'), '.ext'); $this->assertEquals(CopixFile::extractFileExt('filenoext'), null); $this->assertEquals(CopixFile::extractFileName('/chemin/pour/geraldc/'), 'geraldc'); }
/** * Retourne le bon type MIME en fonction d'un nom de fichier * @param string $pFileName le nom du fichier à tester * @return string */ public static function getFromFileName($pFileName) { return self::getFromExtension(CopixFile::extractFileExt($pFileName)); }