From 206079c6ef3b0b013ee32042126b61e03c1ed5cb Mon Sep 17 00:00:00 2001 From: Andrew Reddin Date: Thu, 11 Apr 2013 14:15:55 -0300 Subject: [PATCH] Ran code through PHPCS and fixed standards errors that came up. Original code passed with flying colors using Code Review module. Ran it through PHP_CodeSniffer and it found a crazy amount of errors. Should be fixed now though. --- includes/mime_detect.inc | 115 ++- tests/MimeClass.test | 2108 +++++++------------------------------- 2 files changed, 443 insertions(+), 1780 deletions(-) diff --git a/includes/mime_detect.inc b/includes/mime_detect.inc index 4a6910ec..5c4fe681 100644 --- a/includes/mime_detect.inc +++ b/includes/mime_detect.inc @@ -1,126 +1,130 @@ $val ) { + // Combine the two arrays into one. + foreach ($temp_mime_ext as $key => $val) { $this->mime_types[$key] = $temp_mime_types[$val]; } - //flip the mime_type array to make the ext array + // Flip the mime_type array to make the ext array. $this->ext_types = array_flip($this->mime_types); } /** - * function: getType - * description: An alias to get_mimetype, - * for backwards-compatibility with our old mimetype class. + * For backwards-compatibility with our old mimetype class. + * + * @param string $filename + * Filename to convert to mimetype. * - * @param type $filename - * @return type - */ - function getType($filename) { - return $this->getMimetype($filename); + * @return data + * Returns a string with the mimetype for the file. + */ + public function getType($filename) { + return $this->getMimetype($filename); } /** - * function: get_mimetype - * description: returns a mimetype associated with the - * file extension of $filename + * Returns a mimetype associated with the file extension of $filename. + * + * @param string $filename + * The filename we want the mime type of. * - * @param type $filename - * @param type $debug + * @param bool $debug + * Enable or disable debug output mode. + * * @return string - * mimetype associated with the file extension of $filename + * Mimetype associated with the file extension of $filename. */ public function getMimetype($filename, $debug = FALSE) { - //the file extension will be the last index in the exploded string - $ext = @end(explode('.' , $filename)); + // The file extension will be the last index in the exploded string. + $ext = @end(explode('.', $filename)); $ext = strtolower($ext); - //check the array for a predetermined mime type. If not found, add a warning - //to the watch dog and use the system command to get a value + // Check the array for a predetermined mime type. + // If type not found, add a warning to watchdog. if (!empty($this->mime_types[$ext])) { if (TRUE === $debug) { $return_type = $this->mime_types[$ext]; return array('mime_type' => $return_type, 'method' => 'from_array'); } - + return $this->mime_types[$ext]; } else { - //this file was not in the drupal mime system. - //add a line to the watchdog informing us of this incident + // This file was not in the drupal mime system. + // Add a line to the watchdog informing us of this incident. $err_msg = 'Found a file extension not covered in the drupal mime func:'; - watchdog('MimeClass', $err_msg . $ext ); + watchdog('MimeClass', $err_msg . $ext); } - //by default return application octet stream + // By default return application octet stream. if (TRUE == $debug) { return array('mime_type' => 'application/octet-stream', 'method' => 'last_resort'); } - + return 'application/octet-stream'; } /** - * function: get_extension - * description: returns *one* valid file extension for a given $mime_type + * Returns *one* valid file extension for a given $mime_type. + * + * @param string $type + * String containing the mimetype * - * @param type $mime_type - * @param type $debug - * @return type + * @param bool $debug + * Toggle debug mode on/off + * + * @return string + * Return the file extension */ public function getExtension($type, $debug = FALSE) { - + if (!empty($this->ext_types[$type])) { if (TRUE == $debug) { return array('extension' => $this->ext_types[$type], 'method' => 'from_array'); - } + } return $this->ext_types[$type]; } - else{ - //return bin by default... this could cause errors if handled incorrectly - //and probably should return false or -1 or something to be handled - //client side. + else { + // Return bin by default. This could cause errors. + // Function should return false or -1 or something to be handled. + // Client side. if (TRUE == $debug) { return array('extension' => 'bin', 'method' => 'last_resort'); } @@ -129,4 +133,3 @@ class MimeDetect { } } - diff --git a/tests/MimeClass.test b/tests/MimeClass.test index bdd9d3f7..b76ca5da 100644 --- a/tests/MimeClass.test +++ b/tests/MimeClass.test @@ -1,1745 +1,405 @@ 'MimeClass Test', - 'description' => 'Ensure that the class Mimeclass works as expected', + 'name' => 'MimeDetect Test', + 'description' => 'Ensure that the class MimeDetect works as expected', 'group' => 'Islandora', ); } - /* - * private_test_mime_type - * compares answers from mimeclass.inc to answers - * from the internal array - * - * @return bool - * true if the same, false otherwise - */ - private function private_test_mime_type( $filename ) { - //get the file extension - $ext = @end(explode('.', $filename)); - $ext = strtolower($ext); - - $expected_answer = $this->mime_type_list[$ext]; - - //if there is no index for this filenamein expected answer - //default to application\octet-stream - if ( $expected_answer === NULL ) { - $expected_answer = "application/octet-stream"; - debug("Encountered an unknown filetype:" . $filename); - } - - $actual_answer = $this->mimeclass->getType($ext); - - //if strcmp returns 0, true is returned, else false. - return ( strcmp ( $actual_answer , $expected_answer ) === 0 ); - } - - /* - * private_test_ext_type - * compares answers from mimeclass.inc to answers from the internal array - * - * @return bool - * true if the same, false otherwise - */ - private function private_test_ext_type( $filename ) { - //get the file extension - $ext = @end(explode('.', $filename)); - $ext = strtolower($ext); - - $expected_answer = $this->ext_type_list[$ext]; - $actual_answer = $this->mimeclass->getExtension($ext); - - //if strcmp returns 0, true is returned, else false. - return ( strcmp ( $actual_answer , $expected_answer ) === 0 ); - } - - - /* - * create the array lists used by this test function and set up a test user. - */ + /** + * Call the parent setup function for the test. + */ public function setUp() { - $this->mimeclass = new MimeDetect(); - - - //create the mime and extension array to assert against the values given by the class - $this->ext_type_list = array( 'application/andrew-inset' => 'ez' , - 'application/atom' => 'atom' , - 'application/atomcat+xml' => 'atomcat' , - 'application/atomserv+xml' => 'atomsrv' , - 'application/cap' => 'pcap' , - 'application/cu-seeme' => 'cu' , - 'application/dsptype' => 'tsp' , - 'application/hta' => 'hta' , - 'application/java-archive' => 'jar' , - 'application/java-serialized-object' => 'ser' , - 'application/java-vm' => 'class' , - 'application/mac-binhex40' => 'hqx' , - 'application/mathematica' => 'nb' , - 'application/msaccess' => 'mdb' , - 'application/msword' => 'doc' , - 'application/octet-stream' => 'bin' , - 'application/oda' => 'oda' , - 'application/ogg' => 'ogx' , - 'application/pdf' => 'pdf' , - 'application/pgp-keys' => 'key' , - 'application/pgp-signature' => 'pgp' , - 'application/pics-rules' => 'prf' , - 'application/postscript' => 'ps' , - 'application/rar' => 'rar' , - 'application/rdf+xml' => 'rdf' , - 'application/rss+xml' => 'rss' , - 'application/rtf' => 'rtf' , - 'application/smil' => 'smil' , - 'application/vnd.cinderella' => 'cdy' , - 'application/vnd.google-earth.kml+xml' => 'kml' , - 'application/vnd.google-earth.kmz' => 'kmz' , - 'application/vnd.mozilla.xul+xml' => 'xul' , - 'application/vnd.ms-excel' => 'xls' , - 'application/vnd.ms-excel.addin.macroEnabled.12' => 'xlam' , - 'application/vnd.ms-excel.sheet.binary.macroEnabled.12' => 'xlsb' , - 'application/vnd.ms-excel.sheet.macroEnabled.12' => 'xlsm' , - 'application/vnd.ms-excel.template.macroEnabled.12' => 'xltm' , - 'application/vnd.ms-pki.seccat' => 'cat' , - 'application/vnd.ms-pki.stl' => 'stl' , - 'application/vnd.ms-powerpoint' => 'ppt' , - 'application/vnd.ms-powerpoint.addin.macroEnabled.12' => 'ppam' , - 'application/vnd.ms-powerpoint.presentation.macroEnabled.12' => 'pptm' , - 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12' => 'ppsm' , - 'application/vnd.ms-powerpoint.template.macroEnabled.12' => 'potm' , - 'application/vnd.ms-word.document.macroEnabled.12' => 'docm' , - 'application/vnd.ms-word.template.macroEnabled.12' => 'dotm' , - 'application/vnd.ms-xpsdocument' => 'xps' , - 'application/vnd.oasis.opendocument.chart' => 'odc' , - 'application/vnd.oasis.opendocument.database' => 'odb' , - 'application/vnd.oasis.opendocument.formula' => 'odf' , - 'application/vnd.oasis.opendocument.graphics' => 'odg' , - 'application/vnd.oasis.opendocument.graphics-template' => 'otg' , - 'application/vnd.oasis.opendocument.image' => 'odi' , - 'application/vnd.oasis.opendocument.presentation' => 'odp' , - 'application/vnd.oasis.opendocument.presentation-template' => 'otp' , - 'application/vnd.oasis.opendocument.spreadsheet' => 'ods' , - 'application/vnd.oasis.opendocument.spreadsheet-template' => 'ots' , - 'application/vnd.oasis.opendocument.text' => 'odt' , - 'application/vnd.oasis.opendocument.text-master' => 'odm' , - 'application/vnd.oasis.opendocument.text-template' => 'ott' , - 'application/vnd.oasis.opendocument.text-web' => 'oth' , - 'application/vnd.openxmlformats-officedocument.presentationml.presentation' => 'pptx' , - 'application/vnd.openxmlformats-officedocument.presentationml.slideshow' => 'ppsx' , - 'application/vnd.openxmlformats-officedocument.presentationml.template' => 'potx' , - 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 'xlsx' , - 'application/vnd.openxmlformats-officedocument.spreadsheetml.template' => 'xltx' , - 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => 'docx' , - 'application/vnd.openxmlformats-officedocument.wordprocessingml.template' => 'dotx' , - 'application/vnd.rim.cod' => 'cod' , - 'application/vnd.smaf' => 'mmf' , - 'application/vnd.stardivision.calc' => 'sdc' , - 'application/vnd.stardivision.chart' => 'sds' , - 'application/vnd.stardivision.draw' => 'sda' , - 'application/vnd.stardivision.impress' => 'sdd' , - 'application/vnd.stardivision.writer' => 'sdw' , - 'application/vnd.stardivision.writer-global' => 'sgl' , - 'application/vnd.sun.xml.calc' => 'sxc' , - 'application/vnd.sun.xml.calc.template' => 'stc' , - 'application/vnd.sun.xml.draw' => 'sxd' , - 'application/vnd.sun.xml.draw.template' => 'std' , - 'application/vnd.sun.xml.impress' => 'sxi' , - 'application/vnd.sun.xml.impress.template' => 'sti' , - 'application/vnd.sun.xml.math' => 'sxm' , - 'application/vnd.sun.xml.writer' => 'sxw' , - 'application/vnd.sun.xml.writer.global' => 'sxg' , - 'application/vnd.sun.xml.writer.template' => 'stw' , - 'application/vnd.symbian.install' => 'sis' , - 'application/vnd.visio' => 'vsd' , - 'application/vnd.wap.wbxml' => 'wbxml' , - 'application/vnd.wap.wmlc' => 'wmlc' , - 'application/vnd.wap.wmlscriptc' => 'wmlsc' , - 'application/wordperfect' => 'wpd' , - 'application/wordperfect5.1' => 'wp5' , - 'application/x-123' => 'wk' , - 'application/x-7z-compressed' => '7z' , - 'application/x-abiword' => 'abw' , - 'application/x-apple-diskimage' => 'dmg' , - 'application/x-bcpio' => 'bcpio' , - 'application/x-bittorrent' => 'torrent' , - 'application/x-cab' => 'cab' , - 'application/x-cbr' => 'cbr' , - 'application/x-cbz' => 'cbz' , - 'application/x-cdf' => 'cdf' , - 'application/x-cdlink' => 'vcd' , - 'application/x-chess-pgn' => 'pgn' , - 'application/x-cpio' => 'cpio' , - 'application/x-debian-package' => 'deb' , - 'application/x-director' => 'dcr' , - 'application/x-dms' => 'dms' , - 'application/x-doom' => 'wad' , - 'application/x-dvi' => 'dvi' , - 'application/x-flac' => 'flac' , - 'application/x-font' => 'pcf.z' , - 'application/x-freemind' => 'mm' , - 'application/x-futuresplash' => 'spl' , - 'application/x-gnumeric' => 'gnumeric' , - 'application/x-go-sgf' => 'sgf' , - 'application/x-graphing-calculator' => 'gcf' , - 'application/x-gtar' => 'tgz' , - 'application/x-hdf' => 'hdf' , - 'application/x-httpd-eruby' => 'rhtml' , - 'application/x-httpd-php' => 'php' , - 'application/x-httpd-php-source' => 'phps' , - 'application/x-httpd-php3' => 'php3' , - 'application/x-httpd-php3-preprocessed' => 'php3p' , - 'application/x-httpd-php4' => 'php4' , - 'application/x-ica' => 'ica' , - 'application/x-internet-signup' => 'isp' , - 'application/x-iphone' => 'iii' , - 'application/x-iso9660-image' => 'iso' , - 'application/x-java-jnlp-file' => 'jnlp' , - 'application/x-javascript' => 'js' , - 'application/x-jmol' => 'jmz' , - 'application/x-kchart' => 'chrt' , - 'application/x-killustrator' => 'kil' , - 'application/x-koan' => 'skt' , - 'application/x-kpresenter' => 'kpt' , - 'application/x-kspread' => 'ksp' , - 'application/x-kword' => 'kwt' , - 'application/x-latex' => 'latex' , - 'application/x-lha' => 'lha' , - 'application/x-lyx' => 'lyx' , - 'application/x-lzh' => 'lzh' , - 'application/x-lzx' => 'lzx' , - 'application/x-maker' => 'fbdoc' , - 'application/x-mif' => 'mif' , - 'application/x-ms-wmd' => 'wmd' , - 'application/x-ms-wmz' => 'wmz' , - 'application/x-msdos-program' => 'com' , - 'application/x-msi' => 'msi' , - 'application/x-netcdf' => 'nc' , - 'application/x-ns-proxy-autoconfig' => 'pac' , - 'application/x-nwc' => 'nwc' , - 'application/x-object' => 'o' , - 'application/x-oz-application' => 'oza' , - 'application/x-pkcs7-certreqresp' => 'p7r' , - 'application/x-pkcs7-crl' => 'crl' , - 'application/x-python-code' => 'pyc' , - 'application/x-quicktimeplayer' => 'qtl' , - 'application/x-redhat-package-manager' => 'rpm' , - 'application/x-shar' => 'shar' , - 'application/x-shockwave-flash' => 'swfl' , - 'application/x-stuffit' => 'sit' , - 'application/x-sv4cpio' => 'sv4cpio' , - 'application/x-sv4crc' => 'sv4crc' , - 'application/x-tar' => 'tar' , - 'application/x-tex-gf' => 'gf' , - 'application/x-tex-pk' => 'pk' , - 'application/x-texinfo' => 'texinfo' , - 'application/x-trash' => 'old' , - 'application/x-troff' => 'tr' , - 'application/x-troff-man' => 'man' , - 'application/x-troff-me' => 'me' , - 'application/x-troff-ms' => 'ms' , - 'application/x-ustar' => 'ustar' , - 'application/x-wais-source' => 'src' , - 'application/x-wingz' => 'wz' , - 'application/x-x509-ca-cert' => 'crt' , - 'application/x-xcf' => 'xcf' , - 'application/x-xfig' => 'fig' , - 'application/x-xpinstall' => 'xpi' , - 'application/xhtml+xml' => 'xhtml' , - 'application/xml' => 'xsl' , - 'application/zip' => 'zip' , - 'audio/basic' => 'snd' , - 'audio/midi' => 'kar' , - 'audio/mpeg' => 'mp2' , - 'audio/ogg' => 'spx' , - 'audio/prs.sid' => 'sid' , - 'audio/x-aiff' => 'aifc' , - 'audio/x-gsm' => 'gsm' , - 'audio/x-mpegurl' => 'm3u' , - 'audio/x-ms-wax' => 'wax' , - 'audio/x-ms-wma' => 'wma' , - 'audio/x-pn-realaudio' => 'ram' , - 'audio/x-realaudio' => 'ra' , - 'audio/x-scpls' => 'pls' , - 'audio/x-sd2' => 'sd2' , - 'audio/x-wav' => 'wav' , - 'chemical/x-alchemy' => 'alc' , - 'chemical/x-cache' => 'cache' , - 'chemical/x-cache-csf' => 'csf' , - 'chemical/x-cactvs-binary' => 'ctab' , - 'chemical/x-cdx' => 'cdx' , - 'chemical/x-cerius' => 'cer' , - 'chemical/x-chem3d' => 'c3d' , - 'chemical/x-chemdraw' => 'chm' , - 'chemical/x-cif' => 'cif' , - 'chemical/x-cmdf' => 'cmdf' , - 'chemical/x-cml' => 'cml' , - 'chemical/x-compass' => 'cpa' , - 'chemical/x-crossfire' => 'bsd' , - 'chemical/x-csml' => 'csm' , - 'chemical/x-ctx' => 'ctx' , - 'chemical/x-cxf' => 'cef' , - 'chemical/x-embl-dl-nucleotide' => 'embl' , - 'chemical/x-galactic-spc' => 'spc' , - 'chemical/x-gamess-input' => 'gamin' , - 'chemical/x-gaussian-checkpoint' => 'fch' , - 'chemical/x-gaussian-cube' => 'cub' , - 'chemical/x-gaussian-input' => 'gjc' , - 'chemical/x-gaussian-log' => 'gal' , - 'chemical/x-gcg8-sequence' => 'gcg' , - 'chemical/x-genbank' => 'gen' , - 'chemical/x-hin' => 'hin' , - 'chemical/x-isostar' => 'ist' , - 'chemical/x-jcamp-dx' => 'jdx' , - 'chemical/x-kinemage' => 'kin' , - 'chemical/x-macmolecule' => 'mcm' , - 'chemical/x-macromodel-input' => 'mmod' , - 'chemical/x-mdl-molfile' => 'mol' , - 'chemical/x-mdl-rdfile' => 'rd' , - 'chemical/x-mdl-rxnfile' => 'rxn' , - 'chemical/x-mdl-sdfile' => 'sd' , - 'chemical/x-mdl-tgf' => 'tgf' , - 'chemical/x-mmcif' => 'mcif' , - 'chemical/x-mol2' => 'mol2' , - 'chemical/x-molconn-Z' => 'b' , - 'chemical/x-mopac-graph' => 'gpt' , - 'chemical/x-mopac-input' => 'mop' , - 'chemical/x-mopac-out' => 'moo' , - 'chemical/x-mopac-vib' => 'mvb' , - 'chemical/x-ncbi-asn1-ascii' => 'prt' , - 'chemical/x-ncbi-asn1-binary' => 'val' , - 'chemical/x-ncbi-asn1-spec' => 'asn' , - 'chemical/x-pdb' => 'pdb' , - 'chemical/x-rosdal' => 'ros' , - 'chemical/x-swissprot' => 'sw' , - 'chemical/x-vamas-iso14976' => 'vms' , - 'chemical/x-vmd' => 'vmd' , - 'chemical/x-xtel' => 'xtel' , - 'chemical/x-xyz' => 'xyz' , - 'image/gif' => 'gif' , - 'image/ief' => 'ief' , - 'image/jpeg' => 'jpg' , - 'image/pcx' => 'pcx' , - 'image/png' => 'png' , - 'image/svg+xml' => 'svg' , - 'image/tiff' => 'tiff' , - 'image/vnd.djvu' => 'djv' , - 'image/vnd.microsoft.icon' => 'ico' , - 'image/vnd.wap.wbmp' => 'wbmp' , - 'image/x-cmu-raster' => 'ras' , - 'image/x-coreldraw' => 'cdr' , - 'image/x-coreldrawpattern' => 'pat' , - 'image/x-coreldrawtemplate' => 'cdt' , - 'image/x-corelphotopaint' => 'cpt' , - 'image/x-jg' => 'art' , - 'image/x-jng' => 'jng' , - 'image/x-ms-bmp' => 'bmp' , - 'image/x-photoshop' => 'psd' , - 'image/x-portable-anymap' => 'pnm' , - 'image/x-portable-bitmap' => 'pbm' , - 'image/x-portable-graymap' => 'pgm' , - 'image/x-portable-pixmap' => 'ppm' , - 'image/x-rgb' => 'rgb' , - 'image/x-xbitmap' => 'xbm' , - 'image/x-xpixmap' => 'xpm' , - 'image/x-xwindowdump' => 'xwd' , - 'message/rfc822' => 'eml' , - 'model/iges' => 'iges' , - 'model/mesh' => 'mesh' , - 'text/calendar' => 'ics' , - 'text/css' => 'css' , - 'text/csv' => 'csv' , - 'text/h323' => '323' , - 'text/html' => 'shtml' , - 'text/iuls' => 'uls' , - 'text/mathml' => 'mml' , - 'text/plain' => 'asc' , - 'text/richtext' => 'rtx' , - 'text/scriptlet' => 'sct' , - 'text/tab-separated-values' => 'tsv' , - 'text/texmacs' => 'tm' , - 'text/vnd.sun.j2me.app-descriptor' => 'jad' , - 'text/vnd.wap.wml' => 'wml' , - 'text/vnd.wap.wmlscript' => 'wmls' , - 'text/x-bibtex' => 'bib' , - 'text/x-boo' => 'boo' , - 'text/x-c++hdr' => 'hxx' , - 'text/x-c++src' => 'c++' , - 'text/x-chdr' => 'h' , - 'text/x-component' => 'htc' , - 'text/x-csh' => 'csh' , - 'text/x-csrc' => 'c' , - 'text/x-diff' => 'diff' , - 'text/x-dsrc' => 'd' , - 'text/x-haskell' => 'hs' , - 'text/x-java' => 'java' , - 'text/x-literate-haskell' => 'lhs' , - 'text/x-moc' => 'moc' , - 'text/x-pascal' => 'p' , - 'text/x-pcs-gcd' => 'gcd' , - 'text/x-perl' => 'pl' , - 'text/x-python' => 'py' , - 'text/x-setext' => 'etx' , - 'text/x-sh' => 'sh' , - 'text/x-tcl' => 'tcl' , - 'text/x-tex' => 'tex' , - 'text/x-vcalendar' => 'vcs' , - 'text/x-vcard' => 'vcf' , - 'video/3gpp' => '3gp' , - 'video/dl' => 'dl' , - 'video/dv' => 'dv' , - 'video/fli' => 'fli' , - 'video/gl' => 'gl' , - 'video/mp4' => 'f4p' , - 'video/mpeg' => 'mpg' , - 'video/ogg' => 'ogv' , - 'video/quicktime' => 'mov' , - 'video/vnd.mpegurl' => 'mxu' , - 'video/x-la-asf' => 'lsx' , - 'video/x-mng' => 'mng' , - 'video/x-ms-asf' => 'asf' , - 'video/x-ms-wm' => 'wm' , - 'video/x-ms-wmv' => 'wmv' , - 'video/x-ms-wmx' => 'wmx' , - 'video/x-ms-wvx' => 'wvx' , - 'video/x-msvideo' => 'avi' , - 'video/x-sgi-movie' => 'movie' , - 'x-conference/x-cooltalk' => 'ice' , - 'x-epoc/x-sisx-app' => 'sisx' , - 'x-world/x-vrml' => 'vrml' , - 'audio/mp4' => 'f4b' , - 'video/x-flv' => 'flv' , - 'video/x-m4v' => 'm4v' ); - - $this->mime_type_list = Array( 'ez' => 'application/andrew-inset' , - 'atom' => 'application/atom' , - 'atomcat' => 'application/atomcat+xml' , - 'atomsrv' => 'application/atomserv+xml' , - 'cap' => 'application/cap' , - 'pcap' => 'application/cap' , - 'cu' => 'application/cu-seeme' , - 'tsp' => 'application/dsptype' , - 'hta' => 'application/hta' , - 'jar' => 'application/java-archive' , - 'ser' => 'application/java-serialized-object' , - 'class' => 'application/java-vm' , - 'hqx' => 'application/mac-binhex40' , - 'nb' => 'application/mathematica' , - 'mdb' => 'application/msaccess' , - 'dot' => 'application/msword' , - 'doc' => 'application/msword' , - 'bin' => 'application/octet-stream' , - 'oda' => 'application/oda' , - 'ogx' => 'application/ogg' , - 'pdf' => 'application/pdf' , - 'key' => 'application/pgp-keys' , - 'pgp' => 'application/pgp-signature' , - 'prf' => 'application/pics-rules' , - 'eps' => 'application/postscript' , - 'ai' => 'application/postscript' , - 'ps' => 'application/postscript' , - 'rar' => 'application/rar' , - 'rdf' => 'application/rdf+xml' , - 'rss' => 'application/rss+xml' , - 'rtf' => 'application/rtf' , - 'smi' => 'application/smil' , - 'smil' => 'application/smil' , - 'cdy' => 'application/vnd.cinderella' , - 'kml' => 'application/vnd.google-earth.kml+xml' , - 'kmz' => 'application/vnd.google-earth.kmz' , - 'xul' => 'application/vnd.mozilla.xul+xml' , - 'xlb' => 'application/vnd.ms-excel' , - 'xlt' => 'application/vnd.ms-excel' , - 'xls' => 'application/vnd.ms-excel' , - 'xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12' , - 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12' , - 'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12' , - 'xltm' => 'application/vnd.ms-excel.template.macroEnabled.12' , - 'cat' => 'application/vnd.ms-pki.seccat' , - 'stl' => 'application/vnd.ms-pki.stl' , - 'pps' => 'application/vnd.ms-powerpoint' , - 'ppt' => 'application/vnd.ms-powerpoint' , - 'ppam' => 'application/vnd.ms-powerpoint.addin.macroEnabled.12' , - 'pptm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12' , - 'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12' , - 'potm' => 'application/vnd.ms-powerpoint.template.macroEnabled.12' , - 'docm' => 'application/vnd.ms-word.document.macroEnabled.12' , - 'dotm' => 'application/vnd.ms-word.template.macroEnabled.12' , - 'xps' => 'application/vnd.ms-xpsdocument' , - 'odc' => 'application/vnd.oasis.opendocument.chart' , - 'odb' => 'application/vnd.oasis.opendocument.database' , - 'odf' => 'application/vnd.oasis.opendocument.formula' , - 'odg' => 'application/vnd.oasis.opendocument.graphics' , - 'otg' => 'application/vnd.oasis.opendocument.graphics-template' , - 'odi' => 'application/vnd.oasis.opendocument.image' , - 'odp' => 'application/vnd.oasis.opendocument.presentation' , - 'otp' => 'application/vnd.oasis.opendocument.presentation-template' , - 'ods' => 'application/vnd.oasis.opendocument.spreadsheet' , - 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template' , - 'odt' => 'application/vnd.oasis.opendocument.text' , - 'odm' => 'application/vnd.oasis.opendocument.text-master' , - 'ott' => 'application/vnd.oasis.opendocument.text-template' , - 'oth' => 'application/vnd.oasis.opendocument.text-web' , - 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation' , - 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow' , - 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template' , - 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' , - 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template' , - 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' , - 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template' , - 'cod' => 'application/vnd.rim.cod' , - 'mmf' => 'application/vnd.smaf' , - 'sdc' => 'application/vnd.stardivision.calc' , - 'sds' => 'application/vnd.stardivision.chart' , - 'sda' => 'application/vnd.stardivision.draw' , - 'sdd' => 'application/vnd.stardivision.impress' , - 'sdw' => 'application/vnd.stardivision.writer' , - 'sgl' => 'application/vnd.stardivision.writer-global' , - 'sxc' => 'application/vnd.sun.xml.calc' , - 'stc' => 'application/vnd.sun.xml.calc.template' , - 'sxd' => 'application/vnd.sun.xml.draw' , - 'std' => 'application/vnd.sun.xml.draw.template' , - 'sxi' => 'application/vnd.sun.xml.impress' , - 'sti' => 'application/vnd.sun.xml.impress.template' , - 'sxm' => 'application/vnd.sun.xml.math' , - 'sxw' => 'application/vnd.sun.xml.writer' , - 'sxg' => 'application/vnd.sun.xml.writer.global' , - 'stw' => 'application/vnd.sun.xml.writer.template' , - 'sis' => 'application/vnd.symbian.install' , - 'vsd' => 'application/vnd.visio' , - 'wbxml' => 'application/vnd.wap.wbxml' , - 'wmlc' => 'application/vnd.wap.wmlc' , - 'wmlsc' => 'application/vnd.wap.wmlscriptc' , - 'wpd' => 'application/wordperfect' , - 'wp5' => 'application/wordperfect5.1' , - 'wk' => 'application/x-123' , - '7z' => 'application/x-7z-compressed' , - 'abw' => 'application/x-abiword' , - 'dmg' => 'application/x-apple-diskimage' , - 'bcpio' => 'application/x-bcpio' , - 'torrent' => 'application/x-bittorrent' , - 'cab' => 'application/x-cab' , - 'cbr' => 'application/x-cbr' , - 'cbz' => 'application/x-cbz' , - 'cdf' => 'application/x-cdf' , - 'vcd' => 'application/x-cdlink' , - 'pgn' => 'application/x-chess-pgn' , - 'cpio' => 'application/x-cpio' , - 'udeb' => 'application/x-debian-package' , - 'deb' => 'application/x-debian-package' , - 'dir' => 'application/x-director' , - 'dxr' => 'application/x-director' , - 'dcr' => 'application/x-director' , - 'dms' => 'application/x-dms' , - 'wad' => 'application/x-doom' , - 'dvi' => 'application/x-dvi' , - 'flac' => 'application/x-flac' , - 'pfa' => 'application/x-font' , - 'pfb' => 'application/x-font' , - 'pcf' => 'application/x-font' , - 'gsf' => 'application/x-font' , - 'pcf.z' => 'application/x-font' , - 'mm' => 'application/x-freemind' , - 'spl' => 'application/x-futuresplash' , - 'gnumeric' => 'application/x-gnumeric' , - 'sgf' => 'application/x-go-sgf' , - 'gcf' => 'application/x-graphing-calculator' , - 'taz' => 'application/x-gtar' , - 'gtar' => 'application/x-gtar' , - 'tgz' => 'application/x-gtar' , - 'hdf' => 'application/x-hdf' , - 'rhtml' => 'application/x-httpd-eruby' , - 'phtml' => 'application/x-httpd-php' , - 'pht' => 'application/x-httpd-php' , - 'php' => 'application/x-httpd-php' , - 'phps' => 'application/x-httpd-php-source' , - 'php3' => 'application/x-httpd-php3' , - 'php3p' => 'application/x-httpd-php3-preprocessed' , - 'php4' => 'application/x-httpd-php4' , - 'ica' => 'application/x-ica' , - 'ins' => 'application/x-internet-signup' , - 'isp' => 'application/x-internet-signup' , - 'iii' => 'application/x-iphone' , - 'iso' => 'application/x-iso9660-image' , - 'jnlp' => 'application/x-java-jnlp-file' , - 'js' => 'application/x-javascript' , - 'jmz' => 'application/x-jmol' , - 'chrt' => 'application/x-kchart' , - 'kil' => 'application/x-killustrator' , - 'skp' => 'application/x-koan' , - 'skd' => 'application/x-koan' , - 'skm' => 'application/x-koan' , - 'skt' => 'application/x-koan' , - 'kpr' => 'application/x-kpresenter' , - 'kpt' => 'application/x-kpresenter' , - 'ksp' => 'application/x-kspread' , - 'kwd' => 'application/x-kword' , - 'kwt' => 'application/x-kword' , - 'latex' => 'application/x-latex' , - 'lha' => 'application/x-lha' , - 'lyx' => 'application/x-lyx' , - 'lzh' => 'application/x-lzh' , - 'lzx' => 'application/x-lzx' , - 'maker' => 'application/x-maker' , - 'frm' => 'application/x-maker' , - 'frame' => 'application/x-maker' , - 'fm' => 'application/x-maker' , - 'book' => 'application/x-maker' , - 'fb' => 'application/x-maker' , - 'fbdoc' => 'application/x-maker' , - 'mif' => 'application/x-mif' , - 'wmd' => 'application/x-ms-wmd' , - 'wmz' => 'application/x-ms-wmz' , - 'dll' => 'application/x-msdos-program' , - 'bat' => 'application/x-msdos-program' , - 'exe' => 'application/x-msdos-program' , - 'com' => 'application/x-msdos-program' , - 'msi' => 'application/x-msi' , - 'nc' => 'application/x-netcdf' , - 'pac' => 'application/x-ns-proxy-autoconfig' , - 'nwc' => 'application/x-nwc' , - 'o' => 'application/x-object' , - 'oza' => 'application/x-oz-application' , - 'p7r' => 'application/x-pkcs7-certreqresp' , - 'crl' => 'application/x-pkcs7-crl' , - 'pyo' => 'application/x-python-code' , - 'pyc' => 'application/x-python-code' , - 'qtl' => 'application/x-quicktimeplayer' , - 'rpm' => 'application/x-redhat-package-manager' , - 'shar' => 'application/x-shar' , - 'swf' => 'application/x-shockwave-flash' , - 'swfl' => 'application/x-shockwave-flash' , - 'sitx' => 'application/x-stuffit' , - 'sit' => 'application/x-stuffit' , - 'sv4cpio' => 'application/x-sv4cpio' , - 'sv4crc' => 'application/x-sv4crc' , - 'tar' => 'application/x-tar' , - 'gf' => 'application/x-tex-gf' , - 'pk' => 'application/x-tex-pk' , - 'texi' => 'application/x-texinfo' , - 'texinfo' => 'application/x-texinfo' , - 'sik' => 'application/x-trash' , - '~' => 'application/x-trash' , - 'bak' => 'application/x-trash' , - '%' => 'application/x-trash' , - 'old' => 'application/x-trash' , - 't' => 'application/x-troff' , - 'roff' => 'application/x-troff' , - 'tr' => 'application/x-troff' , - 'man' => 'application/x-troff-man' , - 'me' => 'application/x-troff-me' , - 'ms' => 'application/x-troff-ms' , - 'ustar' => 'application/x-ustar' , - 'src' => 'application/x-wais-source' , - 'wz' => 'application/x-wingz' , - 'crt' => 'application/x-x509-ca-cert' , - 'xcf' => 'application/x-xcf' , - 'fig' => 'application/x-xfig' , - 'xpi' => 'application/x-xpinstall' , - 'xht' => 'application/xhtml+xml' , - 'xhtml' => 'application/xhtml+xml' , - 'xml' => 'application/xml' , - 'xsl' => 'application/xml' , - 'zip' => 'application/zip' , - 'au' => 'audio/basic' , - 'snd' => 'audio/basic' , - 'mid' => 'audio/midi' , - 'midi' => 'audio/midi' , - 'kar' => 'audio/midi' , - 'mpega' => 'audio/mpeg' , - 'mpga' => 'audio/mpeg' , - 'm4a' => 'audio/mpeg' , - 'mp3' => 'audio/mpeg' , - 'mp2' => 'audio/mpeg' , - 'ogg' => 'audio/ogg' , - 'oga' => 'audio/ogg' , - 'spx' => 'audio/ogg' , - 'sid' => 'audio/prs.sid' , - 'aif' => 'audio/x-aiff' , - 'aiff' => 'audio/x-aiff' , - 'aifc' => 'audio/x-aiff' , - 'gsm' => 'audio/x-gsm' , - 'm3u' => 'audio/x-mpegurl' , - 'wax' => 'audio/x-ms-wax' , - 'wma' => 'audio/x-ms-wma' , - 'rm' => 'audio/x-pn-realaudio' , - 'ram' => 'audio/x-pn-realaudio' , - 'ra' => 'audio/x-realaudio' , - 'pls' => 'audio/x-scpls' , - 'sd2' => 'audio/x-sd2' , - 'wav' => 'audio/x-wav' , - 'alc' => 'chemical/x-alchemy' , - 'cac' => 'chemical/x-cache' , - 'cache' => 'chemical/x-cache' , - 'csf' => 'chemical/x-cache-csf' , - 'cascii' => 'chemical/x-cactvs-binary' , - 'cbin' => 'chemical/x-cactvs-binary' , - 'ctab' => 'chemical/x-cactvs-binary' , - 'cdx' => 'chemical/x-cdx' , - 'cer' => 'chemical/x-cerius' , - 'c3d' => 'chemical/x-chem3d' , - 'chm' => 'chemical/x-chemdraw' , - 'cif' => 'chemical/x-cif' , - 'cmdf' => 'chemical/x-cmdf' , - 'cml' => 'chemical/x-cml' , - 'cpa' => 'chemical/x-compass' , - 'bsd' => 'chemical/x-crossfire' , - 'csml' => 'chemical/x-csml' , - 'csm' => 'chemical/x-csml' , - 'ctx' => 'chemical/x-ctx' , - 'cxf' => 'chemical/x-cxf' , - 'cef' => 'chemical/x-cxf' , - 'emb' => 'chemical/x-embl-dl-nucleotide' , - 'embl' => 'chemical/x-embl-dl-nucleotide' , - 'spc' => 'chemical/x-galactic-spc' , - 'gam' => 'chemical/x-gamess-input' , - 'inp' => 'chemical/x-gamess-input' , - 'gamin' => 'chemical/x-gamess-input' , - 'fchk' => 'chemical/x-gaussian-checkpoint' , - 'fch' => 'chemical/x-gaussian-checkpoint' , - 'cub' => 'chemical/x-gaussian-cube' , - 'gau' => 'chemical/x-gaussian-input' , - 'gjf' => 'chemical/x-gaussian-input' , - 'gjc' => 'chemical/x-gaussian-input' , - 'gal' => 'chemical/x-gaussian-log' , - 'gcg' => 'chemical/x-gcg8-sequence' , - 'gen' => 'chemical/x-genbank' , - 'hin' => 'chemical/x-hin' , - 'istr' => 'chemical/x-isostar' , - 'ist' => 'chemical/x-isostar' , - 'dx' => 'chemical/x-jcamp-dx' , - 'jdx' => 'chemical/x-jcamp-dx' , - 'kin' => 'chemical/x-kinemage' , - 'mcm' => 'chemical/x-macmolecule' , - 'mmd' => 'chemical/x-macromodel-input' , - 'mmod' => 'chemical/x-macromodel-input' , - 'mol' => 'chemical/x-mdl-molfile' , - 'rd' => 'chemical/x-mdl-rdfile' , - 'rxn' => 'chemical/x-mdl-rxnfile' , - 'sdf' => 'chemical/x-mdl-sdfile' , - 'sd' => 'chemical/x-mdl-sdfile' , - 'tgf' => 'chemical/x-mdl-tgf' , - 'mcif' => 'chemical/x-mmcif' , - 'mol2' => 'chemical/x-mol2' , - 'b' => 'chemical/x-molconn-Z' , - 'gpt' => 'chemical/x-mopac-graph' , - 'mopcrt' => 'chemical/x-mopac-input' , - 'zmt' => 'chemical/x-mopac-input' , - 'mpc' => 'chemical/x-mopac-input' , - 'dat' => 'chemical/x-mopac-input' , - 'mop' => 'chemical/x-mopac-input' , - 'moo' => 'chemical/x-mopac-out' , - 'mvb' => 'chemical/x-mopac-vib' , - 'prt' => 'chemical/x-ncbi-asn1-ascii' , - 'aso' => 'chemical/x-ncbi-asn1-binary' , - 'val' => 'chemical/x-ncbi-asn1-binary' , - 'asn' => 'chemical/x-ncbi-asn1-spec' , - 'ent' => 'chemical/x-pdb' , - 'pdb' => 'chemical/x-pdb' , - 'ros' => 'chemical/x-rosdal' , - 'sw' => 'chemical/x-swissprot' , - 'vms' => 'chemical/x-vamas-iso14976' , - 'vmd' => 'chemical/x-vmd' , - 'xtel' => 'chemical/x-xtel' , - 'xyz' => 'chemical/x-xyz' , - 'gif' => 'image/gif' , - 'ief' => 'image/ief' , - 'jpeg' => 'image/jpeg' , - 'jpe' => 'image/jpeg' , - 'jpg' => 'image/jpeg' , - 'pcx' => 'image/pcx' , - 'png' => 'image/png' , - 'svgz' => 'image/svg+xml' , - 'svg' => 'image/svg+xml' , - 'tif' => 'image/tiff' , - 'tiff' => 'image/tiff' , - 'djvu' => 'image/vnd.djvu' , - 'djv' => 'image/vnd.djvu' , - 'ico' => 'image/vnd.microsoft.icon' , - 'wbmp' => 'image/vnd.wap.wbmp' , - 'ras' => 'image/x-cmu-raster' , - 'cdr' => 'image/x-coreldraw' , - 'pat' => 'image/x-coreldrawpattern' , - 'cdt' => 'image/x-coreldrawtemplate' , - 'cpt' => 'image/x-corelphotopaint' , - 'art' => 'image/x-jg' , - 'jng' => 'image/x-jng' , - 'bmp' => 'image/x-ms-bmp' , - 'psd' => 'image/x-photoshop' , - 'pnm' => 'image/x-portable-anymap' , - 'pbm' => 'image/x-portable-bitmap' , - 'pgm' => 'image/x-portable-graymap' , - 'ppm' => 'image/x-portable-pixmap' , - 'rgb' => 'image/x-rgb' , - 'xbm' => 'image/x-xbitmap' , - 'xpm' => 'image/x-xpixmap' , - 'xwd' => 'image/x-xwindowdump' , - 'eml' => 'message/rfc822' , - 'igs' => 'model/iges' , - 'iges' => 'model/iges' , - 'silo' => 'model/mesh' , - 'msh' => 'model/mesh' , - 'mesh' => 'model/mesh' , - 'icz' => 'text/calendar' , - 'ics' => 'text/calendar' , - 'css' => 'text/css' , - 'csv' => 'text/csv' , - '323' => 'text/h323' , - 'html' => 'text/html' , - 'htm' => 'text/html' , - 'shtml' => 'text/html' , - 'uls' => 'text/iuls' , - 'mml' => 'text/mathml' , - 'txt' => 'text/plain' , - 'pot' => 'text/plain' , - 'text' => 'text/plain' , - 'asc' => 'text/plain' , - 'rtx' => 'text/richtext' , - 'wsc' => 'text/scriptlet' , - 'sct' => 'text/scriptlet' , - 'tsv' => 'text/tab-separated-values' , - 'ts' => 'text/texmacs' , - 'tm' => 'text/texmacs' , - 'jad' => 'text/vnd.sun.j2me.app-descriptor' , - 'wml' => 'text/vnd.wap.wml' , - 'wmls' => 'text/vnd.wap.wmlscript' , - 'bib' => 'text/x-bibtex' , - 'boo' => 'text/x-boo' , - 'hpp' => 'text/x-c++hdr' , - 'hh' => 'text/x-c++hdr' , - 'h++' => 'text/x-c++hdr' , - 'hxx' => 'text/x-c++hdr' , - 'cxx' => 'text/x-c++src' , - 'cc' => 'text/x-c++src' , - 'cpp' => 'text/x-c++src' , - 'c++' => 'text/x-c++src' , - 'h' => 'text/x-chdr' , - 'htc' => 'text/x-component' , - 'csh' => 'text/x-csh' , - 'c' => 'text/x-csrc' , - 'patch' => 'text/x-diff' , - 'diff' => 'text/x-diff' , - 'd' => 'text/x-dsrc' , - 'hs' => 'text/x-haskell' , - 'java' => 'text/x-java' , - 'lhs' => 'text/x-literate-haskell' , - 'moc' => 'text/x-moc' , - 'pas' => 'text/x-pascal' , - 'p' => 'text/x-pascal' , - 'gcd' => 'text/x-pcs-gcd' , - 'pm' => 'text/x-perl' , - 'pl' => 'text/x-perl' , - 'py' => 'text/x-python' , - 'etx' => 'text/x-setext' , - 'sh' => 'text/x-sh' , - 'tk' => 'text/x-tcl' , - 'tcl' => 'text/x-tcl' , - 'cls' => 'text/x-tex' , - 'ltx' => 'text/x-tex' , - 'sty' => 'text/x-tex' , - 'tex' => 'text/x-tex' , - 'vcs' => 'text/x-vcalendar' , - 'vcf' => 'text/x-vcard' , - '3gp' => 'video/3gpp' , - 'dl' => 'video/dl' , - 'dif' => 'video/dv' , - 'dv' => 'video/dv' , - 'fli' => 'video/fli' , - 'gl' => 'video/gl' , - 'mp4' => 'video/mp4' , - 'f4v' => 'video/mp4' , - 'f4p' => 'video/mp4' , - 'mpe' => 'video/mpeg' , - 'mpeg' => 'video/mpeg' , - 'mpg' => 'video/mpeg' , - 'ogv' => 'video/ogg' , - 'qt' => 'video/quicktime' , - 'mov' => 'video/quicktime' , - 'mxu' => 'video/vnd.mpegurl' , - 'lsf' => 'video/x-la-asf' , - 'lsx' => 'video/x-la-asf' , - 'mng' => 'video/x-mng' , - 'asx' => 'video/x-ms-asf' , - 'asf' => 'video/x-ms-asf' , - 'wm' => 'video/x-ms-wm' , - 'wmv' => 'video/x-ms-wmv' , - 'wmx' => 'video/x-ms-wmx' , - 'wvx' => 'video/x-ms-wvx' , - 'avi' => 'video/x-msvideo' , - 'movie' => 'video/x-sgi-movie' , - 'ice' => 'x-conference/x-cooltalk' , - 'sisx' => 'x-epoc/x-sisx-app' , - 'wrl' => 'x-world/x-vrml' , - 'vrm' => 'x-world/x-vrml' , - 'vrml' => 'x-world/x-vrml' , - 'f4a' => 'audio/mp4' , - 'f4b' => 'audio/mp4' , - 'flv' => 'video/x-flv' , - 'm4v' => 'video/x-m4v' ); - - - - // Enable any modules required for the test. This should be an array of - // module names. - parent::setUp(); - } - - - - - /* - *test the list of mimetypes - */ - public function test_mimes_types( ) { - //Check a file with no period whatsoever - $this->assertTrue($this->private_test_mime_type("png")); + parent::setUp(array('islandora')); + } - //check a file with multiple periods - $this->assertTrue($this->private_test_mime_type("hi.ba.cat.meow.jpg")); + /** + * Test all mime and extension types. + */ + public function testMimeTypes() { + // Create a mime array to assert against the MimeDetect Class. + $mime_type_list = array( + 'ez' => 'application/andrew-inset' , + 'atom' => 'application/atom' , + 'atomcat' => 'application/atomcat+xml' , + 'atomsrv' => 'application/atomserv+xml' , + 'pcap' => 'application/cap' , + 'cu' => 'application/cu-seeme' , + 'tsp' => 'application/dsptype' , + 'hta' => 'application/hta' , + 'jar' => 'application/java-archive' , + 'ser' => 'application/java-serialized-object' , + 'class' => 'application/java-vm' , + 'hqx' => 'application/mac-binhex40' , + 'nb' => 'application/mathematica' , + 'mdb' => 'application/msaccess' , + 'doc' => 'application/msword' , + 'bin' => 'application/octet-stream' , + 'oda' => 'application/oda' , + 'ogx' => 'application/ogg' , + 'pdf' => 'application/pdf' , + 'key' => 'application/pgp-keys' , + 'pgp' => 'application/pgp-signature' , + 'prf' => 'application/pics-rules' , + 'ps' => 'application/postscript' , + 'rar' => 'application/rar' , + 'rdf' => 'application/rdf+xml' , + 'rss' => 'application/rss+xml' , + 'rtf' => 'application/rtf' , + 'smil' => 'application/smil' , + 'cdy' => 'application/vnd.cinderella' , + 'kml' => 'application/vnd.google-earth.kml+xml' , + 'kmz' => 'application/vnd.google-earth.kmz' , + 'xul' => 'application/vnd.mozilla.xul+xml' , + 'xls' => 'application/vnd.ms-excel' , + 'xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12' , + 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12' , + 'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12' , + 'xltm' => 'application/vnd.ms-excel.template.macroEnabled.12' , + 'cat' => 'application/vnd.ms-pki.seccat' , + 'stl' => 'application/vnd.ms-pki.stl' , + 'ppt' => 'application/vnd.ms-powerpoint' , + 'ppam' => 'application/vnd.ms-powerpoint.addin.macroEnabled.12' , + 'pptm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12' , + 'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12' , + 'potm' => 'application/vnd.ms-powerpoint.template.macroEnabled.12' , + 'docm' => 'application/vnd.ms-word.document.macroEnabled.12' , + 'dotm' => 'application/vnd.ms-word.template.macroEnabled.12' , + 'xps' => 'application/vnd.ms-xpsdocument' , + 'odc' => 'application/vnd.oasis.opendocument.chart' , + 'odb' => 'application/vnd.oasis.opendocument.database' , + 'odf' => 'application/vnd.oasis.opendocument.formula' , + 'odg' => 'application/vnd.oasis.opendocument.graphics' , + 'otg' => 'application/vnd.oasis.opendocument.graphics-template' , + 'odi' => 'application/vnd.oasis.opendocument.image' , + 'odp' => 'application/vnd.oasis.opendocument.presentation' , + 'otp' => 'application/vnd.oasis.opendocument.presentation-template' , + 'ods' => 'application/vnd.oasis.opendocument.spreadsheet' , + 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template' , + 'odt' => 'application/vnd.oasis.opendocument.text' , + 'odm' => 'application/vnd.oasis.opendocument.text-master' , + 'ott' => 'application/vnd.oasis.opendocument.text-template' , + 'oth' => 'application/vnd.oasis.opendocument.text-web' , + 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation' , + 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow' , + 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template' , + 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' , + 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template' , + 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' , + 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template' , + 'cod' => 'application/vnd.rim.cod' , + 'mmf' => 'application/vnd.smaf' , + 'sdc' => 'application/vnd.stardivision.calc' , + 'sds' => 'application/vnd.stardivision.chart' , + 'sda' => 'application/vnd.stardivision.draw' , + 'sdd' => 'application/vnd.stardivision.impress' , + 'sdw' => 'application/vnd.stardivision.writer' , + 'sgl' => 'application/vnd.stardivision.writer-global' , + 'sxc' => 'application/vnd.sun.xml.calc' , + 'stc' => 'application/vnd.sun.xml.calc.template' , + 'sxd' => 'application/vnd.sun.xml.draw' , + 'std' => 'application/vnd.sun.xml.draw.template' , + 'sxi' => 'application/vnd.sun.xml.impress' , + 'sti' => 'application/vnd.sun.xml.impress.template' , + 'sxm' => 'application/vnd.sun.xml.math' , + 'sxw' => 'application/vnd.sun.xml.writer' , + 'sxg' => 'application/vnd.sun.xml.writer.global' , + 'stw' => 'application/vnd.sun.xml.writer.template' , + 'sis' => 'application/vnd.symbian.install' , + 'vsd' => 'application/vnd.visio' , + 'wbxml' => 'application/vnd.wap.wbxml' , + 'wmlc' => 'application/vnd.wap.wmlc' , + 'wmlsc' => 'application/vnd.wap.wmlscriptc' , + 'wpd' => 'application/wordperfect' , + 'wp5' => 'application/wordperfect5.1' , + 'wk' => 'application/x-123' , + '7z' => 'application/x-7z-compressed' , + 'abw' => 'application/x-abiword' , + 'dmg' => 'application/x-apple-diskimage' , + 'bcpio' => 'application/x-bcpio' , + 'torrent' => 'application/x-bittorrent' , + 'cab' => 'application/x-cab' , + 'cbr' => 'application/x-cbr' , + 'cbz' => 'application/x-cbz' , + 'cdf' => 'application/x-cdf' , + 'vcd' => 'application/x-cdlink' , + 'pgn' => 'application/x-chess-pgn' , + 'cpio' => 'application/x-cpio' , + 'deb' => 'application/x-debian-package' , + 'dcr' => 'application/x-director' , + 'dms' => 'application/x-dms' , + 'wad' => 'application/x-doom' , + 'dvi' => 'application/x-dvi' , + 'flac' => 'application/x-flac' , + 'mm' => 'application/x-freemind' , + 'spl' => 'application/x-futuresplash' , + 'gnumeric' => 'application/x-gnumeric' , + 'sgf' => 'application/x-go-sgf' , + 'gcf' => 'application/x-graphing-calculator' , + 'tgz' => 'application/x-gtar' , + 'hdf' => 'application/x-hdf' , + 'rhtml' => 'application/x-httpd-eruby' , + 'php' => 'application/x-httpd-php' , + 'phps' => 'application/x-httpd-php-source' , + 'php3' => 'application/x-httpd-php3' , + 'php3p' => 'application/x-httpd-php3-preprocessed' , + 'php4' => 'application/x-httpd-php4' , + 'ica' => 'application/x-ica' , + 'isp' => 'application/x-internet-signup' , + 'iii' => 'application/x-iphone' , + 'iso' => 'application/x-iso9660-image' , + 'jnlp' => 'application/x-java-jnlp-file' , + 'js' => 'application/x-javascript' , + 'jmz' => 'application/x-jmol' , + 'chrt' => 'application/x-kchart' , + 'kil' => 'application/x-killustrator' , + 'skt' => 'application/x-koan' , + 'kpt' => 'application/x-kpresenter' , + 'ksp' => 'application/x-kspread' , + 'kwt' => 'application/x-kword' , + 'latex' => 'application/x-latex' , + 'lha' => 'application/x-lha' , + 'lyx' => 'application/x-lyx' , + 'lzh' => 'application/x-lzh' , + 'lzx' => 'application/x-lzx' , + 'fbdoc' => 'application/x-maker' , + 'mif' => 'application/x-mif' , + 'wmd' => 'application/x-ms-wmd' , + 'wmz' => 'application/x-ms-wmz' , + 'com' => 'application/x-msdos-program' , + 'msi' => 'application/x-msi' , + 'nc' => 'application/x-netcdf' , + 'pac' => 'application/x-ns-proxy-autoconfig' , + 'nwc' => 'application/x-nwc' , + 'o' => 'application/x-object' , + 'oza' => 'application/x-oz-application' , + 'p7r' => 'application/x-pkcs7-certreqresp' , + 'crl' => 'application/x-pkcs7-crl' , + 'pyc' => 'application/x-python-code' , + 'qtl' => 'application/x-quicktimeplayer' , + 'rpm' => 'application/x-redhat-package-manager' , + 'shar' => 'application/x-shar' , + 'swfl' => 'application/x-shockwave-flash' , + 'sit' => 'application/x-stuffit' , + 'sv4cpio' => 'application/x-sv4cpio' , + 'sv4crc' => 'application/x-sv4crc' , + 'tar' => 'application/x-tar' , + 'gf' => 'application/x-tex-gf' , + 'pk' => 'application/x-tex-pk' , + 'texinfo' => 'application/x-texinfo' , + 'old' => 'application/x-trash' , + 'tr' => 'application/x-troff' , + 'man' => 'application/x-troff-man' , + 'me' => 'application/x-troff-me' , + 'ms' => 'application/x-troff-ms' , + 'ustar' => 'application/x-ustar' , + 'src' => 'application/x-wais-source' , + 'wz' => 'application/x-wingz' , + 'crt' => 'application/x-x509-ca-cert' , + 'xcf' => 'application/x-xcf' , + 'fig' => 'application/x-xfig' , + 'xpi' => 'application/x-xpinstall' , + 'xhtml' => 'application/xhtml+xml' , + 'xsl' => 'application/xml' , + 'zip' => 'application/zip' , + 'snd' => 'audio/basic' , + 'kar' => 'audio/midi' , + 'mp2' => 'audio/mpeg' , + 'spx' => 'audio/ogg' , + 'sid' => 'audio/prs.sid' , + 'aifc' => 'audio/x-aiff' , + 'gsm' => 'audio/x-gsm' , + 'm3u' => 'audio/x-mpegurl' , + 'wax' => 'audio/x-ms-wax' , + 'wma' => 'audio/x-ms-wma' , + 'ram' => 'audio/x-pn-realaudio' , + 'ra' => 'audio/x-realaudio' , + 'pls' => 'audio/x-scpls' , + 'sd2' => 'audio/x-sd2' , + 'wav' => 'audio/x-wav' , + 'alc' => 'chemical/x-alchemy' , + 'cache' => 'chemical/x-cache' , + 'csf' => 'chemical/x-cache-csf' , + 'ctab' => 'chemical/x-cactvs-binary' , + 'cdx' => 'chemical/x-cdx' , + 'cer' => 'chemical/x-cerius' , + 'c3d' => 'chemical/x-chem3d' , + 'chm' => 'chemical/x-chemdraw' , + 'cif' => 'chemical/x-cif' , + 'cmdf' => 'chemical/x-cmdf' , + 'cml' => 'chemical/x-cml' , + 'cpa' => 'chemical/x-compass' , + 'bsd' => 'chemical/x-crossfire' , + 'csm' => 'chemical/x-csml' , + 'ctx' => 'chemical/x-ctx' , + 'cef' => 'chemical/x-cxf' , + 'embl' => 'chemical/x-embl-dl-nucleotide' , + 'spc' => 'chemical/x-galactic-spc' , + 'gamin' => 'chemical/x-gamess-input' , + 'fch' => 'chemical/x-gaussian-checkpoint' , + 'cub' => 'chemical/x-gaussian-cube' , + 'gjc' => 'chemical/x-gaussian-input' , + 'gal' => 'chemical/x-gaussian-log' , + 'gcg' => 'chemical/x-gcg8-sequence' , + 'gen' => 'chemical/x-genbank' , + 'hin' => 'chemical/x-hin' , + 'ist' => 'chemical/x-isostar' , + 'jdx' => 'chemical/x-jcamp-dx' , + 'kin' => 'chemical/x-kinemage' , + 'mcm' => 'chemical/x-macmolecule' , + 'mmod' => 'chemical/x-macromodel-input' , + 'mol' => 'chemical/x-mdl-molfile' , + 'rd' => 'chemical/x-mdl-rdfile' , + 'rxn' => 'chemical/x-mdl-rxnfile' , + 'sd' => 'chemical/x-mdl-sdfile' , + 'tgf' => 'chemical/x-mdl-tgf' , + 'mcif' => 'chemical/x-mmcif' , + 'mol2' => 'chemical/x-mol2' , + 'b' => 'chemical/x-molconn-Z' , + 'mop' => 'chemical/x-mopac-input' , + 'moo' => 'chemical/x-mopac-out' , + 'mvb' => 'chemical/x-mopac-vib' , + 'prt' => 'chemical/x-ncbi-asn1-ascii' , + 'val' => 'chemical/x-ncbi-asn1-binary' , + 'asn' => 'chemical/x-ncbi-asn1-spec' , + 'pdb' => 'chemical/x-pdb' , + 'ros' => 'chemical/x-rosdal' , + 'sw' => 'chemical/x-swissprot' , + 'vms' => 'chemical/x-vamas-iso14976' , + 'vmd' => 'chemical/x-vmd' , + 'xtel' => 'chemical/x-xtel' , + 'xyz' => 'chemical/x-xyz' , + 'gif' => 'image/gif' , + 'ief' => 'image/ief' , + 'jpg' => 'image/jpeg' , + 'pcx' => 'image/pcx' , + 'png' => 'image/png' , + 'svg' => 'image/svg+xml' , + 'tiff' => 'image/tiff' , + 'djv' => 'image/vnd.djvu' , + 'ico' => 'image/vnd.microsoft.icon' , + 'wbmp' => 'image/vnd.wap.wbmp' , + 'ras' => 'image/x-cmu-raster' , + 'cdr' => 'image/x-coreldraw' , + 'pat' => 'image/x-coreldrawpattern' , + 'cdt' => 'image/x-coreldrawtemplate' , + 'cpt' => 'image/x-corelphotopaint' , + 'art' => 'image/x-jg' , + 'jng' => 'image/x-jng' , + 'bmp' => 'image/x-ms-bmp' , + 'psd' => 'image/x-photoshop' , + 'pnm' => 'image/x-portable-anymap' , + 'pbm' => 'image/x-portable-bitmap' , + 'pgm' => 'image/x-portable-graymap' , + 'ppm' => 'image/x-portable-pixmap' , + 'rgb' => 'image/x-rgb' , + 'xbm' => 'image/x-xbitmap' , + 'xpm' => 'image/x-xpixmap' , + 'xwd' => 'image/x-xwindowdump' , + 'eml' => 'message/rfc822' , + 'iges' => 'model/iges' , + 'mesh' => 'model/mesh' , + 'ics' => 'text/calendar' , + 'css' => 'text/css' , + 'csv' => 'text/csv' , + '323' => 'text/h323' , + 'shtml' => 'text/html' , + 'uls' => 'text/iuls' , + 'mml' => 'text/mathml' , + 'asc' => 'text/plain' , + 'rtx' => 'text/richtext' , + 'sct' => 'text/scriptlet' , + 'tsv' => 'text/tab-separated-values' , + 'tm' => 'text/texmacs' , + 'jad' => 'text/vnd.sun.j2me.app-descriptor' , + 'wml' => 'text/vnd.wap.wml' , + 'wmls' => 'text/vnd.wap.wmlscript' , + 'bib' => 'text/x-bibtex' , + 'boo' => 'text/x-boo' , + 'hxx' => 'text/x-c++hdr' , + 'c++' => 'text/x-c++src' , + 'h' => 'text/x-chdr' , + 'htc' => 'text/x-component' , + 'csh' => 'text/x-csh' , + 'c' => 'text/x-csrc' , + 'diff' => 'text/x-diff' , + 'd' => 'text/x-dsrc' , + 'hs' => 'text/x-haskell' , + 'java' => 'text/x-java' , + 'lhs' => 'text/x-literate-haskell' , + 'moc' => 'text/x-moc' , + 'p' => 'text/x-pascal' , + 'gcd' => 'text/x-pcs-gcd' , + 'pl' => 'text/x-perl' , + 'py' => 'text/x-python' , + 'etx' => 'text/x-setext' , + 'sh' => 'text/x-sh' , + 'tcl' => 'text/x-tcl' , + 'tex' => 'text/x-tex' , + 'vcs' => 'text/x-vcalendar' , + 'vcf' => 'text/x-vcard' , + '3gp' => 'video/3gpp' , + 'dl' => 'video/dl' , + 'dv' => 'video/dv' , + 'fli' => 'video/fli' , + 'gl' => 'video/gl' , + 'f4p' => 'video/mp4' , + 'mpg' => 'video/mpeg' , + 'ogv' => 'video/ogg' , + 'mov' => 'video/quicktime' , + 'mxu' => 'video/vnd.mpegurl' , + 'lsx' => 'video/x-la-asf' , + 'mng' => 'video/x-mng' , + 'asf' => 'video/x-ms-asf' , + 'wm' => 'video/x-ms-wm' , + 'wmv' => 'video/x-ms-wmv' , + 'wmx' => 'video/x-ms-wmx' , + 'wvx' => 'video/x-ms-wvx' , + 'avi' => 'video/x-msvideo' , + 'movie' => 'video/x-sgi-movie' , + 'ice' => 'x-conference/x-cooltalk' , + 'sisx' => 'x-epoc/x-sisx-app' , + 'vrml' => 'x-world/x-vrml' , + 'f4b' => 'audio/mp4' , + 'flv' => 'video/x-flv' , + 'm4v' => 'video/x-m4v'); - //Test all filenames in the function - $this->assertTrue($this->private_test_mime_type("test.ez")); - $this->assertTrue($this->private_test_mime_type("test.atom")); - $this->assertTrue($this->private_test_mime_type("test.atomcat")); - $this->assertTrue($this->private_test_mime_type("test.atomsrv")); - $this->assertTrue($this->private_test_mime_type("test.cap")); - $this->assertTrue($this->private_test_mime_type("test.pcap")); - $this->assertTrue($this->private_test_mime_type("test.cu")); - $this->assertTrue($this->private_test_mime_type("test.tsp")); - $this->assertTrue($this->private_test_mime_type("test.hta")); - $this->assertTrue($this->private_test_mime_type("test.jar")); - $this->assertTrue($this->private_test_mime_type("test.ser")); - $this->assertTrue($this->private_test_mime_type("test.class")); - $this->assertTrue($this->private_test_mime_type("test.hqx")); - $this->assertTrue($this->private_test_mime_type("test.nb")); - $this->assertTrue($this->private_test_mime_type("test.mdb")); - $this->assertTrue($this->private_test_mime_type("test.dot")); - $this->assertTrue($this->private_test_mime_type("test.doc")); - $this->assertTrue($this->private_test_mime_type("test.bin")); - $this->assertTrue($this->private_test_mime_type("test.oda")); - $this->assertTrue($this->private_test_mime_type("test.ogx")); - $this->assertTrue($this->private_test_mime_type("test.pdf")); - $this->assertTrue($this->private_test_mime_type("test.key")); - $this->assertTrue($this->private_test_mime_type("test.pgp")); - $this->assertTrue($this->private_test_mime_type("test.prf")); - $this->assertTrue($this->private_test_mime_type("test.eps")); - $this->assertTrue($this->private_test_mime_type("test.ai")); - $this->assertTrue($this->private_test_mime_type("test.ps")); - $this->assertTrue($this->private_test_mime_type("test.rar")); - $this->assertTrue($this->private_test_mime_type("test.rdf")); - $this->assertTrue($this->private_test_mime_type("test.rss")); - $this->assertTrue($this->private_test_mime_type("test.rtf")); - $this->assertTrue($this->private_test_mime_type("test.smi")); - $this->assertTrue($this->private_test_mime_type("test.smil")); - $this->assertTrue($this->private_test_mime_type("test.cdy")); - $this->assertTrue($this->private_test_mime_type("test.kml")); - $this->assertTrue($this->private_test_mime_type("test.kmz")); - $this->assertTrue($this->private_test_mime_type("test.xul")); - $this->assertTrue($this->private_test_mime_type("test.xlb")); - $this->assertTrue($this->private_test_mime_type("test.xlt")); - $this->assertTrue($this->private_test_mime_type("test.xls")); - $this->assertTrue($this->private_test_mime_type("test.xlam")); - $this->assertTrue($this->private_test_mime_type("test.xlsb")); - $this->assertTrue($this->private_test_mime_type("test.xlsm")); - $this->assertTrue($this->private_test_mime_type("test.xltm")); - $this->assertTrue($this->private_test_mime_type("test.cat")); - $this->assertTrue($this->private_test_mime_type("test.stl")); - $this->assertTrue($this->private_test_mime_type("test.pps")); - $this->assertTrue($this->private_test_mime_type("test.ppt")); - $this->assertTrue($this->private_test_mime_type("test.ppam")); - $this->assertTrue($this->private_test_mime_type("test.pptm")); - $this->assertTrue($this->private_test_mime_type("test.ppsm")); - $this->assertTrue($this->private_test_mime_type("test.potm")); - $this->assertTrue($this->private_test_mime_type("test.docm")); - $this->assertTrue($this->private_test_mime_type("test.dotm")); - $this->assertTrue($this->private_test_mime_type("test.xps")); - $this->assertTrue($this->private_test_mime_type("test.odc")); - $this->assertTrue($this->private_test_mime_type("test.odb")); - $this->assertTrue($this->private_test_mime_type("test.odf")); - $this->assertTrue($this->private_test_mime_type("test.odg")); - $this->assertTrue($this->private_test_mime_type("test.otg")); - $this->assertTrue($this->private_test_mime_type("test.odi")); - $this->assertTrue($this->private_test_mime_type("test.odp")); - $this->assertTrue($this->private_test_mime_type("test.otp")); - $this->assertTrue($this->private_test_mime_type("test.ods")); - $this->assertTrue($this->private_test_mime_type("test.ots")); - $this->assertTrue($this->private_test_mime_type("test.odt")); - $this->assertTrue($this->private_test_mime_type("test.odm")); - $this->assertTrue($this->private_test_mime_type("test.ott")); - $this->assertTrue($this->private_test_mime_type("test.oth")); - $this->assertTrue($this->private_test_mime_type("test.pptx")); - $this->assertTrue($this->private_test_mime_type("test.ppsx")); - $this->assertTrue($this->private_test_mime_type("test.potx")); - $this->assertTrue($this->private_test_mime_type("test.xlsx")); - $this->assertTrue($this->private_test_mime_type("test.xltx")); - $this->assertTrue($this->private_test_mime_type("test.docx")); - $this->assertTrue($this->private_test_mime_type("test.dotx")); - $this->assertTrue($this->private_test_mime_type("test.cod")); - $this->assertTrue($this->private_test_mime_type("test.mmf")); - $this->assertTrue($this->private_test_mime_type("test.sdc")); - $this->assertTrue($this->private_test_mime_type("test.sds")); - $this->assertTrue($this->private_test_mime_type("test.sda")); - $this->assertTrue($this->private_test_mime_type("test.sdd")); - $this->assertTrue($this->private_test_mime_type("test.sdw")); - $this->assertTrue($this->private_test_mime_type("test.sgl")); - $this->assertTrue($this->private_test_mime_type("test.sxc")); - $this->assertTrue($this->private_test_mime_type("test.stc")); - $this->assertTrue($this->private_test_mime_type("test.sxd")); - $this->assertTrue($this->private_test_mime_type("test.std")); - $this->assertTrue($this->private_test_mime_type("test.sxi")); - $this->assertTrue($this->private_test_mime_type("test.sti")); - $this->assertTrue($this->private_test_mime_type("test.sxm")); - $this->assertTrue($this->private_test_mime_type("test.sxw")); - $this->assertTrue($this->private_test_mime_type("test.sxg")); - $this->assertTrue($this->private_test_mime_type("test.stw")); - $this->assertTrue($this->private_test_mime_type("test.sis")); - $this->assertTrue($this->private_test_mime_type("test.vsd")); - $this->assertTrue($this->private_test_mime_type("test.wbxml")); - $this->assertTrue($this->private_test_mime_type("test.wmlc")); - $this->assertTrue($this->private_test_mime_type("test.wmlsc")); - $this->assertTrue($this->private_test_mime_type("test.wpd")); - $this->assertTrue($this->private_test_mime_type("test.wp5")); - $this->assertTrue($this->private_test_mime_type("test.wk")); - $this->assertTrue($this->private_test_mime_type("test.7z")); - $this->assertTrue($this->private_test_mime_type("test.abw")); - $this->assertTrue($this->private_test_mime_type("test.dmg")); - $this->assertTrue($this->private_test_mime_type("test.bcpio")); - $this->assertTrue($this->private_test_mime_type("test.torrent")); - $this->assertTrue($this->private_test_mime_type("test.cab")); - $this->assertTrue($this->private_test_mime_type("test.cbr")); - $this->assertTrue($this->private_test_mime_type("test.cbz")); - $this->assertTrue($this->private_test_mime_type("test.cdf")); - $this->assertTrue($this->private_test_mime_type("test.vcd")); - $this->assertTrue($this->private_test_mime_type("test.pgn")); - $this->assertTrue($this->private_test_mime_type("test.cpio")); - $this->assertTrue($this->private_test_mime_type("test.udeb")); - $this->assertTrue($this->private_test_mime_type("test.deb")); - $this->assertTrue($this->private_test_mime_type("test.dir")); - $this->assertTrue($this->private_test_mime_type("test.dxr")); - $this->assertTrue($this->private_test_mime_type("test.dcr")); - $this->assertTrue($this->private_test_mime_type("test.dms")); - $this->assertTrue($this->private_test_mime_type("test.wad")); - $this->assertTrue($this->private_test_mime_type("test.dvi")); - $this->assertTrue($this->private_test_mime_type("test.flac")); - $this->assertTrue($this->private_test_mime_type("test.pfa")); - $this->assertTrue($this->private_test_mime_type("test.pfb")); - $this->assertTrue($this->private_test_mime_type("test.pcf")); - $this->assertTrue($this->private_test_mime_type("test.gsf")); - $this->assertTrue($this->private_test_mime_type("test.pcf.z")); - $this->assertTrue($this->private_test_mime_type("test.mm")); - $this->assertTrue($this->private_test_mime_type("test.spl")); - $this->assertTrue($this->private_test_mime_type("test.gnumeric")); - $this->assertTrue($this->private_test_mime_type("test.sgf")); - $this->assertTrue($this->private_test_mime_type("test.gcf")); - $this->assertTrue($this->private_test_mime_type("test.taz")); - $this->assertTrue($this->private_test_mime_type("test.gtar")); - $this->assertTrue($this->private_test_mime_type("test.tgz")); - $this->assertTrue($this->private_test_mime_type("test.hdf")); - $this->assertTrue($this->private_test_mime_type("test.rhtml")); - $this->assertTrue($this->private_test_mime_type("test.phtml")); - $this->assertTrue($this->private_test_mime_type("test.pht")); - $this->assertTrue($this->private_test_mime_type("test.php")); - $this->assertTrue($this->private_test_mime_type("test.phps")); - $this->assertTrue($this->private_test_mime_type("test.php3")); - $this->assertTrue($this->private_test_mime_type("test.php3p")); - $this->assertTrue($this->private_test_mime_type("test.php4")); - $this->assertTrue($this->private_test_mime_type("test.ica")); - $this->assertTrue($this->private_test_mime_type("test.ins")); - $this->assertTrue($this->private_test_mime_type("test.isp")); - $this->assertTrue($this->private_test_mime_type("test.iii")); - $this->assertTrue($this->private_test_mime_type("test.iso")); - $this->assertTrue($this->private_test_mime_type("test.jnlp")); - $this->assertTrue($this->private_test_mime_type("test.js")); - $this->assertTrue($this->private_test_mime_type("test.jmz")); - $this->assertTrue($this->private_test_mime_type("test.chrt")); - $this->assertTrue($this->private_test_mime_type("test.kil")); - $this->assertTrue($this->private_test_mime_type("test.skp")); - $this->assertTrue($this->private_test_mime_type("test.skd")); - $this->assertTrue($this->private_test_mime_type("test.skm")); - $this->assertTrue($this->private_test_mime_type("test.skt")); - $this->assertTrue($this->private_test_mime_type("test.kpr")); - $this->assertTrue($this->private_test_mime_type("test.kpt")); - $this->assertTrue($this->private_test_mime_type("test.ksp")); - $this->assertTrue($this->private_test_mime_type("test.kwd")); - $this->assertTrue($this->private_test_mime_type("test.kwt")); - $this->assertTrue($this->private_test_mime_type("test.latex")); - $this->assertTrue($this->private_test_mime_type("test.lha")); - $this->assertTrue($this->private_test_mime_type("test.lyx")); - $this->assertTrue($this->private_test_mime_type("test.lzh")); - $this->assertTrue($this->private_test_mime_type("test.lzx")); - $this->assertTrue($this->private_test_mime_type("test.maker")); - $this->assertTrue($this->private_test_mime_type("test.frm")); - $this->assertTrue($this->private_test_mime_type("test.frame")); - $this->assertTrue($this->private_test_mime_type("test.fm")); - $this->assertTrue($this->private_test_mime_type("test.book")); - $this->assertTrue($this->private_test_mime_type("test.fb")); - $this->assertTrue($this->private_test_mime_type("test.fbdoc")); - $this->assertTrue($this->private_test_mime_type("test.mif")); - $this->assertTrue($this->private_test_mime_type("test.wmd")); - $this->assertTrue($this->private_test_mime_type("test.wmz")); - $this->assertTrue($this->private_test_mime_type("test.dll")); - $this->assertTrue($this->private_test_mime_type("test.bat")); - $this->assertTrue($this->private_test_mime_type("test.exe")); - $this->assertTrue($this->private_test_mime_type("test.com")); - $this->assertTrue($this->private_test_mime_type("test.msi")); - $this->assertTrue($this->private_test_mime_type("test.nc")); - $this->assertTrue($this->private_test_mime_type("test.pac")); - $this->assertTrue($this->private_test_mime_type("test.nwc")); - $this->assertTrue($this->private_test_mime_type("test.o")); - $this->assertTrue($this->private_test_mime_type("test.oza")); - $this->assertTrue($this->private_test_mime_type("test.p7r")); - $this->assertTrue($this->private_test_mime_type("test.crl")); - $this->assertTrue($this->private_test_mime_type("test.pyo")); - $this->assertTrue($this->private_test_mime_type("test.pyc")); - $this->assertTrue($this->private_test_mime_type("test.qtl")); - $this->assertTrue($this->private_test_mime_type("test.rpm")); - $this->assertTrue($this->private_test_mime_type("test.shar")); - $this->assertTrue($this->private_test_mime_type("test.swf")); - $this->assertTrue($this->private_test_mime_type("test.swfl")); - $this->assertTrue($this->private_test_mime_type("test.sitx")); - $this->assertTrue($this->private_test_mime_type("test.sit")); - $this->assertTrue($this->private_test_mime_type("test.sv4cpio")); - $this->assertTrue($this->private_test_mime_type("test.sv4crc")); - $this->assertTrue($this->private_test_mime_type("test.tar")); - $this->assertTrue($this->private_test_mime_type("test.gf")); - $this->assertTrue($this->private_test_mime_type("test.pk")); - $this->assertTrue($this->private_test_mime_type("test.texi")); - $this->assertTrue($this->private_test_mime_type("test.texinfo")); - $this->assertTrue($this->private_test_mime_type("test.sik")); - $this->assertTrue($this->private_test_mime_type("test.~")); - $this->assertTrue($this->private_test_mime_type("test.bak")); - $this->assertTrue($this->private_test_mime_type("test.%")); - $this->assertTrue($this->private_test_mime_type("test.old")); - $this->assertTrue($this->private_test_mime_type("test.t")); - $this->assertTrue($this->private_test_mime_type("test.roff")); - $this->assertTrue($this->private_test_mime_type("test.tr")); - $this->assertTrue($this->private_test_mime_type("test.man")); - $this->assertTrue($this->private_test_mime_type("test.me")); - $this->assertTrue($this->private_test_mime_type("test.ms")); - $this->assertTrue($this->private_test_mime_type("test.ustar")); - $this->assertTrue($this->private_test_mime_type("test.src")); - $this->assertTrue($this->private_test_mime_type("test.wz")); - $this->assertTrue($this->private_test_mime_type("test.crt")); - $this->assertTrue($this->private_test_mime_type("test.xcf")); - $this->assertTrue($this->private_test_mime_type("test.fig")); - $this->assertTrue($this->private_test_mime_type("test.xpi")); - $this->assertTrue($this->private_test_mime_type("test.xht")); - $this->assertTrue($this->private_test_mime_type("test.xhtml")); - $this->assertTrue($this->private_test_mime_type("test.xml")); - $this->assertTrue($this->private_test_mime_type("test.xsl")); - $this->assertTrue($this->private_test_mime_type("test.zip")); - $this->assertTrue($this->private_test_mime_type("test.au")); - $this->assertTrue($this->private_test_mime_type("test.snd")); - $this->assertTrue($this->private_test_mime_type("test.mid")); - $this->assertTrue($this->private_test_mime_type("test.midi")); - $this->assertTrue($this->private_test_mime_type("test.kar")); - $this->assertTrue($this->private_test_mime_type("test.mpega")); - $this->assertTrue($this->private_test_mime_type("test.mpga")); - $this->assertTrue($this->private_test_mime_type("test.m4a")); - $this->assertTrue($this->private_test_mime_type("test.mp3")); - $this->assertTrue($this->private_test_mime_type("test.mp2")); - $this->assertTrue($this->private_test_mime_type("test.ogg")); - $this->assertTrue($this->private_test_mime_type("test.oga")); - $this->assertTrue($this->private_test_mime_type("test.spx")); - $this->assertTrue($this->private_test_mime_type("test.sid")); - $this->assertTrue($this->private_test_mime_type("test.aif")); - $this->assertTrue($this->private_test_mime_type("test.aiff")); - $this->assertTrue($this->private_test_mime_type("test.aifc")); - $this->assertTrue($this->private_test_mime_type("test.gsm")); - $this->assertTrue($this->private_test_mime_type("test.m3u")); - $this->assertTrue($this->private_test_mime_type("test.wax")); - $this->assertTrue($this->private_test_mime_type("test.wma")); - $this->assertTrue($this->private_test_mime_type("test.rm")); - $this->assertTrue($this->private_test_mime_type("test.ram")); - $this->assertTrue($this->private_test_mime_type("test.ra")); - $this->assertTrue($this->private_test_mime_type("test.pls")); - $this->assertTrue($this->private_test_mime_type("test.sd2")); - $this->assertTrue($this->private_test_mime_type("test.wav")); - $this->assertTrue($this->private_test_mime_type("test.alc")); - $this->assertTrue($this->private_test_mime_type("test.cac")); - $this->assertTrue($this->private_test_mime_type("test.cache")); - $this->assertTrue($this->private_test_mime_type("test.csf")); - $this->assertTrue($this->private_test_mime_type("test.cascii")); - $this->assertTrue($this->private_test_mime_type("test.cbin")); - $this->assertTrue($this->private_test_mime_type("test.ctab")); - $this->assertTrue($this->private_test_mime_type("test.cdx")); - $this->assertTrue($this->private_test_mime_type("test.cer")); - $this->assertTrue($this->private_test_mime_type("test.c3d")); - $this->assertTrue($this->private_test_mime_type("test.chm")); - $this->assertTrue($this->private_test_mime_type("test.cif")); - $this->assertTrue($this->private_test_mime_type("test.cmdf")); - $this->assertTrue($this->private_test_mime_type("test.cml")); - $this->assertTrue($this->private_test_mime_type("test.cpa")); - $this->assertTrue($this->private_test_mime_type("test.bsd")); - $this->assertTrue($this->private_test_mime_type("test.csml")); - $this->assertTrue($this->private_test_mime_type("test.csm")); - $this->assertTrue($this->private_test_mime_type("test.ctx")); - $this->assertTrue($this->private_test_mime_type("test.cxf")); - $this->assertTrue($this->private_test_mime_type("test.cef")); - $this->assertTrue($this->private_test_mime_type("test.emb")); - $this->assertTrue($this->private_test_mime_type("test.embl")); - $this->assertTrue($this->private_test_mime_type("test.spc")); - $this->assertTrue($this->private_test_mime_type("test.gam")); - $this->assertTrue($this->private_test_mime_type("test.inp")); - $this->assertTrue($this->private_test_mime_type("test.gamin")); - $this->assertTrue($this->private_test_mime_type("test.fchk")); - $this->assertTrue($this->private_test_mime_type("test.fch")); - $this->assertTrue($this->private_test_mime_type("test.cub")); - $this->assertTrue($this->private_test_mime_type("test.gau")); - $this->assertTrue($this->private_test_mime_type("test.gjf")); - $this->assertTrue($this->private_test_mime_type("test.gjc")); - $this->assertTrue($this->private_test_mime_type("test.gal")); - $this->assertTrue($this->private_test_mime_type("test.gcg")); - $this->assertTrue($this->private_test_mime_type("test.gen")); - $this->assertTrue($this->private_test_mime_type("test.hin")); - $this->assertTrue($this->private_test_mime_type("test.istr")); - $this->assertTrue($this->private_test_mime_type("test.ist")); - $this->assertTrue($this->private_test_mime_type("test.dx")); - $this->assertTrue($this->private_test_mime_type("test.jdx")); - $this->assertTrue($this->private_test_mime_type("test.kin")); - $this->assertTrue($this->private_test_mime_type("test.mcm")); - $this->assertTrue($this->private_test_mime_type("test.mmd")); - $this->assertTrue($this->private_test_mime_type("test.mmod")); - $this->assertTrue($this->private_test_mime_type("test.mol")); - $this->assertTrue($this->private_test_mime_type("test.rd")); - $this->assertTrue($this->private_test_mime_type("test.rxn")); - $this->assertTrue($this->private_test_mime_type("test.sdf")); - $this->assertTrue($this->private_test_mime_type("test.sd")); - $this->assertTrue($this->private_test_mime_type("test.tgf")); - $this->assertTrue($this->private_test_mime_type("test.mcif")); - $this->assertTrue($this->private_test_mime_type("test.mol2")); - $this->assertTrue($this->private_test_mime_type("test.b")); - $this->assertTrue($this->private_test_mime_type("test.gpt")); - $this->assertTrue($this->private_test_mime_type("test.mopcrt")); - $this->assertTrue($this->private_test_mime_type("test.zmt")); - $this->assertTrue($this->private_test_mime_type("test.mpc")); - $this->assertTrue($this->private_test_mime_type("test.dat")); - $this->assertTrue($this->private_test_mime_type("test.mop")); - $this->assertTrue($this->private_test_mime_type("test.moo")); - $this->assertTrue($this->private_test_mime_type("test.mvb")); - $this->assertTrue($this->private_test_mime_type("test.prt")); - $this->assertTrue($this->private_test_mime_type("test.aso")); - $this->assertTrue($this->private_test_mime_type("test.val")); - $this->assertTrue($this->private_test_mime_type("test.asn")); - $this->assertTrue($this->private_test_mime_type("test.ent")); - $this->assertTrue($this->private_test_mime_type("test.pdb")); - $this->assertTrue($this->private_test_mime_type("test.ros")); - $this->assertTrue($this->private_test_mime_type("test.sw")); - $this->assertTrue($this->private_test_mime_type("test.vms")); - $this->assertTrue($this->private_test_mime_type("test.vmd")); - $this->assertTrue($this->private_test_mime_type("test.xtel")); - $this->assertTrue($this->private_test_mime_type("test.xyz")); - $this->assertTrue($this->private_test_mime_type("test.gif")); - $this->assertTrue($this->private_test_mime_type("test.ief")); - $this->assertTrue($this->private_test_mime_type("test.jpeg")); - $this->assertTrue($this->private_test_mime_type("test.jpe")); - $this->assertTrue($this->private_test_mime_type("test.jpg")); - $this->assertTrue($this->private_test_mime_type("test.pcx")); - $this->assertTrue($this->private_test_mime_type("test.png")); - $this->assertTrue($this->private_test_mime_type("test.svgz")); - $this->assertTrue($this->private_test_mime_type("test.svg")); - $this->assertTrue($this->private_test_mime_type("test.tif")); - $this->assertTrue($this->private_test_mime_type("test.tiff")); - $this->assertTrue($this->private_test_mime_type("test.djvu")); - $this->assertTrue($this->private_test_mime_type("test.djv")); - $this->assertTrue($this->private_test_mime_type("test.ico")); - $this->assertTrue($this->private_test_mime_type("test.wbmp")); - $this->assertTrue($this->private_test_mime_type("test.ras")); - $this->assertTrue($this->private_test_mime_type("test.cdr")); - $this->assertTrue($this->private_test_mime_type("test.pat")); - $this->assertTrue($this->private_test_mime_type("test.cdt")); - $this->assertTrue($this->private_test_mime_type("test.cpt")); - $this->assertTrue($this->private_test_mime_type("test.art")); - $this->assertTrue($this->private_test_mime_type("test.jng")); - $this->assertTrue($this->private_test_mime_type("test.bmp")); - $this->assertTrue($this->private_test_mime_type("test.psd")); - $this->assertTrue($this->private_test_mime_type("test.pnm")); - $this->assertTrue($this->private_test_mime_type("test.pbm")); - $this->assertTrue($this->private_test_mime_type("test.pgm")); - $this->assertTrue($this->private_test_mime_type("test.ppm")); - $this->assertTrue($this->private_test_mime_type("test.rgb")); - $this->assertTrue($this->private_test_mime_type("test.xbm")); - $this->assertTrue($this->private_test_mime_type("test.xpm")); - $this->assertTrue($this->private_test_mime_type("test.xwd")); - $this->assertTrue($this->private_test_mime_type("test.eml")); - $this->assertTrue($this->private_test_mime_type("test.igs")); - $this->assertTrue($this->private_test_mime_type("test.iges")); - $this->assertTrue($this->private_test_mime_type("test.silo")); - $this->assertTrue($this->private_test_mime_type("test.msh")); - $this->assertTrue($this->private_test_mime_type("test.mesh")); - $this->assertTrue($this->private_test_mime_type("test.icz")); - $this->assertTrue($this->private_test_mime_type("test.ics")); - $this->assertTrue($this->private_test_mime_type("test.css")); - $this->assertTrue($this->private_test_mime_type("test.csv")); - $this->assertTrue($this->private_test_mime_type("test.323")); - $this->assertTrue($this->private_test_mime_type("test.html")); - $this->assertTrue($this->private_test_mime_type("test.htm")); - $this->assertTrue($this->private_test_mime_type("test.shtml")); - $this->assertTrue($this->private_test_mime_type("test.uls")); - $this->assertTrue($this->private_test_mime_type("test.mml")); - $this->assertTrue($this->private_test_mime_type("test.txt")); - $this->assertTrue($this->private_test_mime_type("test.pot")); - $this->assertTrue($this->private_test_mime_type("test.text")); - $this->assertTrue($this->private_test_mime_type("test.asc")); - $this->assertTrue($this->private_test_mime_type("test.rtx")); - $this->assertTrue($this->private_test_mime_type("test.wsc")); - $this->assertTrue($this->private_test_mime_type("test.sct")); - $this->assertTrue($this->private_test_mime_type("test.tsv")); - $this->assertTrue($this->private_test_mime_type("test.ts")); - $this->assertTrue($this->private_test_mime_type("test.tm")); - $this->assertTrue($this->private_test_mime_type("test.jad")); - $this->assertTrue($this->private_test_mime_type("test.wml")); - $this->assertTrue($this->private_test_mime_type("test.wmls")); - $this->assertTrue($this->private_test_mime_type("test.bib")); - $this->assertTrue($this->private_test_mime_type("test.boo")); - $this->assertTrue($this->private_test_mime_type("test.hpp")); - $this->assertTrue($this->private_test_mime_type("test.hh")); - $this->assertTrue($this->private_test_mime_type("test.h++")); - $this->assertTrue($this->private_test_mime_type("test.hxx")); - $this->assertTrue($this->private_test_mime_type("test.cxx")); - $this->assertTrue($this->private_test_mime_type("test.cc")); - $this->assertTrue($this->private_test_mime_type("test.cpp")); - $this->assertTrue($this->private_test_mime_type("test.c++")); - $this->assertTrue($this->private_test_mime_type("test.h")); - $this->assertTrue($this->private_test_mime_type("test.htc")); - $this->assertTrue($this->private_test_mime_type("test.csh")); - $this->assertTrue($this->private_test_mime_type("test.c")); - $this->assertTrue($this->private_test_mime_type("test.patch")); - $this->assertTrue($this->private_test_mime_type("test.diff")); - $this->assertTrue($this->private_test_mime_type("test.d")); - $this->assertTrue($this->private_test_mime_type("test.hs")); - $this->assertTrue($this->private_test_mime_type("test.java")); - $this->assertTrue($this->private_test_mime_type("test.lhs")); - $this->assertTrue($this->private_test_mime_type("test.moc")); - $this->assertTrue($this->private_test_mime_type("test.pas")); - $this->assertTrue($this->private_test_mime_type("test.p")); - $this->assertTrue($this->private_test_mime_type("test.gcd")); - $this->assertTrue($this->private_test_mime_type("test.pm")); - $this->assertTrue($this->private_test_mime_type("test.pl")); - $this->assertTrue($this->private_test_mime_type("test.py")); - $this->assertTrue($this->private_test_mime_type("test.etx")); - $this->assertTrue($this->private_test_mime_type("test.sh")); - $this->assertTrue($this->private_test_mime_type("test.tk")); - $this->assertTrue($this->private_test_mime_type("test.tcl")); - $this->assertTrue($this->private_test_mime_type("test.cls")); - $this->assertTrue($this->private_test_mime_type("test.ltx")); - $this->assertTrue($this->private_test_mime_type("test.sty")); - $this->assertTrue($this->private_test_mime_type("test.tex")); - $this->assertTrue($this->private_test_mime_type("test.vcs")); - $this->assertTrue($this->private_test_mime_type("test.vcf")); - $this->assertTrue($this->private_test_mime_type("test.3gp")); - $this->assertTrue($this->private_test_mime_type("test.dl")); - $this->assertTrue($this->private_test_mime_type("test.dif")); - $this->assertTrue($this->private_test_mime_type("test.dv")); - $this->assertTrue($this->private_test_mime_type("test.fli")); - $this->assertTrue($this->private_test_mime_type("test.gl")); - $this->assertTrue($this->private_test_mime_type("test.mp4")); - $this->assertTrue($this->private_test_mime_type("test.f4v")); - $this->assertTrue($this->private_test_mime_type("test.f4p")); - $this->assertTrue($this->private_test_mime_type("test.mpe")); - $this->assertTrue($this->private_test_mime_type("test.mpeg")); - $this->assertTrue($this->private_test_mime_type("test.mpg")); - $this->assertTrue($this->private_test_mime_type("test.ogv")); - $this->assertTrue($this->private_test_mime_type("test.qt")); - $this->assertTrue($this->private_test_mime_type("test.mov")); - $this->assertTrue($this->private_test_mime_type("test.mxu")); - $this->assertTrue($this->private_test_mime_type("test.lsf")); - $this->assertTrue($this->private_test_mime_type("test.lsx")); - $this->assertTrue($this->private_test_mime_type("test.mng")); - $this->assertTrue($this->private_test_mime_type("test.asx")); - $this->assertTrue($this->private_test_mime_type("test.asf")); - $this->assertTrue($this->private_test_mime_type("test.wm")); - $this->assertTrue($this->private_test_mime_type("test.wmv")); - $this->assertTrue($this->private_test_mime_type("test.wmx")); - $this->assertTrue($this->private_test_mime_type("test.wvx")); - $this->assertTrue($this->private_test_mime_type("test.avi")); - $this->assertTrue($this->private_test_mime_type("test.movie")); - $this->assertTrue($this->private_test_mime_type("test.ice")); - $this->assertTrue($this->private_test_mime_type("test.sisx")); - $this->assertTrue($this->private_test_mime_type("test.wrl")); - $this->assertTrue($this->private_test_mime_type("test.vrm")); - $this->assertTrue($this->private_test_mime_type("test.vrml")); - $this->assertTrue($this->private_test_mime_type("test.f4a")); - $this->assertTrue($this->private_test_mime_type("test.f4b")); - $this->assertTrue($this->private_test_mime_type("test.flv")); - $this->assertTrue($this->private_test_mime_type("test.m4v")); - } + // Insantiate the mime class. + $mime_detect = new MimeDetect(); - /* - * test the list of extension types - */ - function text_ext_types( ) { - $this->assertTrue($this->private_test_mime_type("application/andrew-inset")); - $this->assertTrue($this->private_test_mime_type("application/atom")); - $this->assertTrue($this->private_test_mime_type("application/atomcat+xml")); - $this->assertTrue($this->private_test_mime_type("application/atomserv+xml")); - $this->assertTrue($this->private_test_mime_type("application/cap")); - $this->assertTrue($this->private_test_mime_type("application/cu-seeme")); - $this->assertTrue($this->private_test_mime_type("application/dsptype")); - $this->assertTrue($this->private_test_mime_type("application/hta")); - $this->assertTrue($this->private_test_mime_type("application/java-archive")); - $this->assertTrue($this->private_test_mime_type("application/java-serialized-object")); - $this->assertTrue($this->private_test_mime_type("application/java-vm")); - $this->assertTrue($this->private_test_mime_type("application/mac-binhex40")); - $this->assertTrue($this->private_test_mime_type("application/mathematica")); - $this->assertTrue($this->private_test_mime_type("application/msaccess")); - $this->assertTrue($this->private_test_mime_type("application/msword")); - $this->assertTrue($this->private_test_mime_type("application/octet-stream")); - $this->assertTrue($this->private_test_mime_type("application/oda")); - $this->assertTrue($this->private_test_mime_type("application/ogg")); - $this->assertTrue($this->private_test_mime_type("application/pdf")); - $this->assertTrue($this->private_test_mime_type("application/pgp-keys")); - $this->assertTrue($this->private_test_mime_type("application/pgp-signature")); - $this->assertTrue($this->private_test_mime_type("application/pics-rules")); - $this->assertTrue($this->private_test_mime_type("application/postscript")); - $this->assertTrue($this->private_test_mime_type("application/rar")); - $this->assertTrue($this->private_test_mime_type("application/rdf+xml")); - $this->assertTrue($this->private_test_mime_type("application/rss+xml")); - $this->assertTrue($this->private_test_mime_type("application/rtf")); - $this->assertTrue($this->private_test_mime_type("application/smil")); - $this->assertTrue($this->private_test_mime_type("application/vnd.cinderella")); - $this->assertTrue($this->private_test_mime_type("application/vnd.google-earth.kml+xml")); - $this->assertTrue($this->private_test_mime_type("application/vnd.google-earth.kmz")); - $this->assertTrue($this->private_test_mime_type("application/vnd.mozilla.xul+xml")); - $this->assertTrue($this->private_test_mime_type("application/vnd.ms-excel")); - $this->assertTrue($this->private_test_mime_type("application/vnd.ms-excel.addin.macroEnabled.12")); - $this->assertTrue($this->private_test_mime_type("application/vnd.ms-excel.sheet.binary.macroEnabled.12")); - $this->assertTrue($this->private_test_mime_type("application/vnd.ms-excel.sheet.macroEnabled.12")); - $this->assertTrue($this->private_test_mime_type("application/vnd.ms-excel.template.macroEnabled.12")); - $this->assertTrue($this->private_test_mime_type("application/vnd.ms-pki.seccat")); - $this->assertTrue($this->private_test_mime_type("application/vnd.ms-pki.stl")); - $this->assertTrue($this->private_test_mime_type("application/vnd.ms-powerpoint")); - $this->assertTrue($this->private_test_mime_type("application/vnd.ms-powerpoint.addin.macroEnabled.12")); - $this->assertTrue($this->private_test_mime_type("application/vnd.ms-powerpoint.presentation.macroEnabled.12")); - $this->assertTrue($this->private_test_mime_type("application/vnd.ms-powerpoint.slideshow.macroEnabled.12")); - $this->assertTrue($this->private_test_mime_type("application/vnd.ms-powerpoint.template.macroEnabled.12")); - $this->assertTrue($this->private_test_mime_type("application/vnd.ms-word.document.macroEnabled.12")); - $this->assertTrue($this->private_test_mime_type("application/vnd.ms-word.template.macroEnabled.12")); - $this->assertTrue($this->private_test_mime_type("application/vnd.ms-xpsdocument")); - $this->assertTrue($this->private_test_mime_type("application/vnd.oasis.opendocument.chart")); - $this->assertTrue($this->private_test_mime_type("application/vnd.oasis.opendocument.database")); - $this->assertTrue($this->private_test_mime_type("application/vnd.oasis.opendocument.formula")); - $this->assertTrue($this->private_test_mime_type("application/vnd.oasis.opendocument.graphics")); - $this->assertTrue($this->private_test_mime_type("application/vnd.oasis.opendocument.graphics-template")); - $this->assertTrue($this->private_test_mime_type("application/vnd.oasis.opendocument.image")); - $this->assertTrue($this->private_test_mime_type("application/vnd.oasis.opendocument.presentation")); - $this->assertTrue($this->private_test_mime_type("application/vnd.oasis.opendocument.presentation-template")); - $this->assertTrue($this->private_test_mime_type("application/vnd.oasis.opendocument.spreadsheet")); - $this->assertTrue($this->private_test_mime_type("application/vnd.oasis.opendocument.spreadsheet-template")); - $this->assertTrue($this->private_test_mime_type("application/vnd.oasis.opendocument.text")); - $this->assertTrue($this->private_test_mime_type("application/vnd.oasis.opendocument.text-master")); - $this->assertTrue($this->private_test_mime_type("application/vnd.oasis.opendocument.text-template")); - $this->assertTrue($this->private_test_mime_type("application/vnd.oasis.opendocument.text-web")); - $this->assertTrue($this->private_test_mime_type("application/vnd.openxmlformats-officedocument.presentationml.presentation")); - $this->assertTrue($this->private_test_mime_type("application/vnd.openxmlformats-officedocument.presentationml.slideshow")); - $this->assertTrue($this->private_test_mime_type("application/vnd.openxmlformats-officedocument.presentationml.template")); - $this->assertTrue($this->private_test_mime_type("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")); - $this->assertTrue($this->private_test_mime_type("application/vnd.openxmlformats-officedocument.spreadsheetml.template")); - $this->assertTrue($this->private_test_mime_type("application/vnd.openxmlformats-officedocument.wordprocessingml.document")); - $this->assertTrue($this->private_test_mime_type("application/vnd.openxmlformats-officedocument.wordprocessingml.template")); - $this->assertTrue($this->private_test_mime_type("application/vnd.rim.cod")); - $this->assertTrue($this->private_test_mime_type("application/vnd.smaf")); - $this->assertTrue($this->private_test_mime_type("application/vnd.stardivision.calc")); - $this->assertTrue($this->private_test_mime_type("application/vnd.stardivision.chart")); - $this->assertTrue($this->private_test_mime_type("application/vnd.stardivision.draw")); - $this->assertTrue($this->private_test_mime_type("application/vnd.stardivision.impress")); - $this->assertTrue($this->private_test_mime_type("application/vnd.stardivision.math")); - $this->assertTrue($this->private_test_mime_type("application/vnd.stardivision.writer")); - $this->assertTrue($this->private_test_mime_type("application/vnd.stardivision.writer-global")); - $this->assertTrue($this->private_test_mime_type("application/vnd.sun.xml.calc")); - $this->assertTrue($this->private_test_mime_type("application/vnd.sun.xml.calc.template")); - $this->assertTrue($this->private_test_mime_type("application/vnd.sun.xml.draw")); - $this->assertTrue($this->private_test_mime_type("application/vnd.sun.xml.draw.template")); - $this->assertTrue($this->private_test_mime_type("application/vnd.sun.xml.impress")); - $this->assertTrue($this->private_test_mime_type("application/vnd.sun.xml.impress.template")); - $this->assertTrue($this->private_test_mime_type("application/vnd.sun.xml.math")); - $this->assertTrue($this->private_test_mime_type("application/vnd.sun.xml.writer")); - $this->assertTrue($this->private_test_mime_type("application/vnd.sun.xml.writer.global")); - $this->assertTrue($this->private_test_mime_type("application/vnd.sun.xml.writer.template")); - $this->assertTrue($this->private_test_mime_type("application/vnd.symbian.install")); - $this->assertTrue($this->private_test_mime_type("application/vnd.visio")); - $this->assertTrue($this->private_test_mime_type("application/vnd.wap.wbxml")); - $this->assertTrue($this->private_test_mime_type("application/vnd.wap.wmlc")); - $this->assertTrue($this->private_test_mime_type("application/vnd.wap.wmlscriptc")); - $this->assertTrue($this->private_test_mime_type("application/wordperfect")); - $this->assertTrue($this->private_test_mime_type("application/wordperfect5.1")); - $this->assertTrue($this->private_test_mime_type("application/x-123")); - $this->assertTrue($this->private_test_mime_type("application/x-7z-compressed")); - $this->assertTrue($this->private_test_mime_type("application/x-abiword")); - $this->assertTrue($this->private_test_mime_type("application/x-apple-diskimage")); - $this->assertTrue($this->private_test_mime_type("application/x-bcpio")); - $this->assertTrue($this->private_test_mime_type("application/x-bittorrent")); - $this->assertTrue($this->private_test_mime_type("application/x-cab")); - $this->assertTrue($this->private_test_mime_type("application/x-cbr")); - $this->assertTrue($this->private_test_mime_type("application/x-cbz")); - $this->assertTrue($this->private_test_mime_type("application/x-cdf")); - $this->assertTrue($this->private_test_mime_type("application/x-cdlink")); - $this->assertTrue($this->private_test_mime_type("application/x-chess-pgn")); - $this->assertTrue($this->private_test_mime_type("application/x-cpio")); - $this->assertTrue($this->private_test_mime_type("application/x-debian-package")); - $this->assertTrue($this->private_test_mime_type("application/x-director")); - $this->assertTrue($this->private_test_mime_type("application/x-dms")); - $this->assertTrue($this->private_test_mime_type("application/x-doom")); - $this->assertTrue($this->private_test_mime_type("application/x-dvi")); - $this->assertTrue($this->private_test_mime_type("application/x-flac")); - $this->assertTrue($this->private_test_mime_type("application/x-font")); - $this->assertTrue($this->private_test_mime_type("application/x-freemind")); - $this->assertTrue($this->private_test_mime_type("application/x-futuresplash")); - $this->assertTrue($this->private_test_mime_type("application/x-gnumeric")); - $this->assertTrue($this->private_test_mime_type("application/x-go-sgf")); - $this->assertTrue($this->private_test_mime_type("application/x-graphing-calculator")); - $this->assertTrue($this->private_test_mime_type("application/x-gtar")); - $this->assertTrue($this->private_test_mime_type("application/x-hdf")); - $this->assertTrue($this->private_test_mime_type("application/x-httpd-eruby")); - $this->assertTrue($this->private_test_mime_type("application/x-httpd-php")); - $this->assertTrue($this->private_test_mime_type("application/x-httpd-php-source")); - $this->assertTrue($this->private_test_mime_type("application/x-httpd-php3")); - $this->assertTrue($this->private_test_mime_type("application/x-httpd-php3-preprocessed")); - $this->assertTrue($this->private_test_mime_type("application/x-httpd-php4")); - $this->assertTrue($this->private_test_mime_type("application/x-ica")); - $this->assertTrue($this->private_test_mime_type("application/x-internet-signup")); - $this->assertTrue($this->private_test_mime_type("application/x-iphone")); - $this->assertTrue($this->private_test_mime_type("application/x-iso9660-image")); - $this->assertTrue($this->private_test_mime_type("application/x-java-jnlp-file")); - $this->assertTrue($this->private_test_mime_type("application/x-javascript")); - $this->assertTrue($this->private_test_mime_type("application/x-jmol")); - $this->assertTrue($this->private_test_mime_type("application/x-kchart")); - $this->assertTrue($this->private_test_mime_type("application/x-killustrator")); - $this->assertTrue($this->private_test_mime_type("application/x-koan")); - $this->assertTrue($this->private_test_mime_type("application/x-kpresenter")); - $this->assertTrue($this->private_test_mime_type("application/x-kspread")); - $this->assertTrue($this->private_test_mime_type("application/x-kword")); - $this->assertTrue($this->private_test_mime_type("application/x-latex")); - $this->assertTrue($this->private_test_mime_type("application/x-lha")); - $this->assertTrue($this->private_test_mime_type("application/x-lyx")); - $this->assertTrue($this->private_test_mime_type("application/x-lzh")); - $this->assertTrue($this->private_test_mime_type("application/x-lzx")); - $this->assertTrue($this->private_test_mime_type("application/x-maker")); - $this->assertTrue($this->private_test_mime_type("application/x-mif")); - $this->assertTrue($this->private_test_mime_type("application/x-ms-wmd")); - $this->assertTrue($this->private_test_mime_type("application/x-ms-wmz")); - $this->assertTrue($this->private_test_mime_type("application/x-msdos-program")); - $this->assertTrue($this->private_test_mime_type("application/x-msi")); - $this->assertTrue($this->private_test_mime_type("application/x-netcdf")); - $this->assertTrue($this->private_test_mime_type("application/x-ns-proxy-autoconfig")); - $this->assertTrue($this->private_test_mime_type("application/x-nwc")); - $this->assertTrue($this->private_test_mime_type("application/x-object")); - $this->assertTrue($this->private_test_mime_type("application/x-oz-application")); - $this->assertTrue($this->private_test_mime_type("application/x-pkcs7-certreqresp")); - $this->assertTrue($this->private_test_mime_type("application/x-pkcs7-crl")); - $this->assertTrue($this->private_test_mime_type("application/x-python-code")); - $this->assertTrue($this->private_test_mime_type("application/x-quicktimeplayer")); - $this->assertTrue($this->private_test_mime_type("application/x-redhat-package-manager")); - $this->assertTrue($this->private_test_mime_type("application/x-shar")); - $this->assertTrue($this->private_test_mime_type("application/x-shockwave-flash")); - $this->assertTrue($this->private_test_mime_type("application/x-stuffit")); - $this->assertTrue($this->private_test_mime_type("application/x-sv4cpio")); - $this->assertTrue($this->private_test_mime_type("application/x-sv4crc")); - $this->assertTrue($this->private_test_mime_type("application/x-tar")); - $this->assertTrue($this->private_test_mime_type("application/x-tcl")); - $this->assertTrue($this->private_test_mime_type("application/x-tex-gf")); - $this->assertTrue($this->private_test_mime_type("application/x-tex-pk")); - $this->assertTrue($this->private_test_mime_type("application/x-texinfo")); - $this->assertTrue($this->private_test_mime_type("application/x-trash")); - $this->assertTrue($this->private_test_mime_type("application/x-troff")); - $this->assertTrue($this->private_test_mime_type("application/x-troff-man")); - $this->assertTrue($this->private_test_mime_type("application/x-troff-me")); - $this->assertTrue($this->private_test_mime_type("application/x-troff-ms")); - $this->assertTrue($this->private_test_mime_type("application/x-ustar")); - $this->assertTrue($this->private_test_mime_type("application/x-wais-source")); - $this->assertTrue($this->private_test_mime_type("application/x-wingz")); - $this->assertTrue($this->private_test_mime_type("application/x-x509-ca-cert")); - $this->assertTrue($this->private_test_mime_type("application/x-xcf")); - $this->assertTrue($this->private_test_mime_type("application/x-xfig")); - $this->assertTrue($this->private_test_mime_type("application/x-xpinstall")); - $this->assertTrue($this->private_test_mime_type("application/xhtml+xml")); - $this->assertTrue($this->private_test_mime_type("application/xml")); - $this->assertTrue($this->private_test_mime_type("application/zip")); - $this->assertTrue($this->private_test_mime_type("audio/basic")); - $this->assertTrue($this->private_test_mime_type("audio/midi")); - $this->assertTrue($this->private_test_mime_type("audio/mp4")); - $this->assertTrue($this->private_test_mime_type("audio/mpeg")); - $this->assertTrue($this->private_test_mime_type("audio/ogg")); - $this->assertTrue($this->private_test_mime_type("audio/prs.sid")); - $this->assertTrue($this->private_test_mime_type("audio/x-aiff")); - $this->assertTrue($this->private_test_mime_type("audio/x-gsm")); - $this->assertTrue($this->private_test_mime_type("audio/x-mpegurl")); - $this->assertTrue($this->private_test_mime_type("audio/x-ms-wax")); - $this->assertTrue($this->private_test_mime_type("audio/x-ms-wma")); - $this->assertTrue($this->private_test_mime_type("audio/x-pn-realaudio")); - $this->assertTrue($this->private_test_mime_type("audio/x-realaudio")); - $this->assertTrue($this->private_test_mime_type("audio/x-scpls")); - $this->assertTrue($this->private_test_mime_type("audio/x-sd2")); - $this->assertTrue($this->private_test_mime_type("audio/x-wav")); - $this->assertTrue($this->private_test_mime_type("chemical/x-alchemy")); - $this->assertTrue($this->private_test_mime_type("chemical/x-cache")); - $this->assertTrue($this->private_test_mime_type("chemical/x-cache-csf")); - $this->assertTrue($this->private_test_mime_type("chemical/x-cactvs-binary")); - $this->assertTrue($this->private_test_mime_type("chemical/x-cdx")); - $this->assertTrue($this->private_test_mime_type("chemical/x-cerius")); - $this->assertTrue($this->private_test_mime_type("chemical/x-chem3d")); - $this->assertTrue($this->private_test_mime_type("chemical/x-chemdraw")); - $this->assertTrue($this->private_test_mime_type("chemical/x-cif")); - $this->assertTrue($this->private_test_mime_type("chemical/x-cmdf")); - $this->assertTrue($this->private_test_mime_type("chemical/x-cml")); - $this->assertTrue($this->private_test_mime_type("chemical/x-compass")); - $this->assertTrue($this->private_test_mime_type("chemical/x-crossfire")); - $this->assertTrue($this->private_test_mime_type("chemical/x-csml")); - $this->assertTrue($this->private_test_mime_type("chemical/x-ctx")); - $this->assertTrue($this->private_test_mime_type("chemical/x-cxf")); - $this->assertTrue($this->private_test_mime_type("chemical/x-embl-dl-nucleotide")); - $this->assertTrue($this->private_test_mime_type("chemical/x-galactic-spc")); - $this->assertTrue($this->private_test_mime_type("chemical/x-gamess-input")); - $this->assertTrue($this->private_test_mime_type("chemical/x-gaussian-checkpoint")); - $this->assertTrue($this->private_test_mime_type("chemical/x-gaussian-cube")); - $this->assertTrue($this->private_test_mime_type("chemical/x-gaussian-input")); - $this->assertTrue($this->private_test_mime_type("chemical/x-gaussian-log")); - $this->assertTrue($this->private_test_mime_type("chemical/x-gcg8-sequence")); - $this->assertTrue($this->private_test_mime_type("chemical/x-genbank")); - $this->assertTrue($this->private_test_mime_type("chemical/x-hin")); - $this->assertTrue($this->private_test_mime_type("chemical/x-isostar")); - $this->assertTrue($this->private_test_mime_type("chemical/x-jcamp-dx")); - $this->assertTrue($this->private_test_mime_type("chemical/x-kinemage")); - $this->assertTrue($this->private_test_mime_type("chemical/x-macmolecule")); - $this->assertTrue($this->private_test_mime_type("chemical/x-macromodel-input")); - $this->assertTrue($this->private_test_mime_type("chemical/x-mdl-molfile")); - $this->assertTrue($this->private_test_mime_type("chemical/x-mdl-rdfile")); - $this->assertTrue($this->private_test_mime_type("chemical/x-mdl-rxnfile")); - $this->assertTrue($this->private_test_mime_type("chemical/x-mdl-sdfile")); - $this->assertTrue($this->private_test_mime_type("chemical/x-mdl-tgf")); - $this->assertTrue($this->private_test_mime_type("chemical/x-mmcif")); - $this->assertTrue($this->private_test_mime_type("chemical/x-mol2")); - $this->assertTrue($this->private_test_mime_type("chemical/x-molconn-Z")); - $this->assertTrue($this->private_test_mime_type("chemical/x-mopac-graph")); - $this->assertTrue($this->private_test_mime_type("chemical/x-mopac-input")); - $this->assertTrue($this->private_test_mime_type("chemical/x-mopac-out")); - $this->assertTrue($this->private_test_mime_type("chemical/x-mopac-vib")); - $this->assertTrue($this->private_test_mime_type("chemical/x-ncbi-asn1-ascii")); - $this->assertTrue($this->private_test_mime_type("chemical/x-ncbi-asn1-binary")); - $this->assertTrue($this->private_test_mime_type("chemical/x-ncbi-asn1-spec")); - $this->assertTrue($this->private_test_mime_type("chemical/x-pdb")); - $this->assertTrue($this->private_test_mime_type("chemical/x-rosdal")); - $this->assertTrue($this->private_test_mime_type("chemical/x-swissprot")); - $this->assertTrue($this->private_test_mime_type("chemical/x-vamas-iso14976")); - $this->assertTrue($this->private_test_mime_type("chemical/x-vmd")); - $this->assertTrue($this->private_test_mime_type("chemical/x-xtel")); - $this->assertTrue($this->private_test_mime_type("chemical/x-xyz")); - $this->assertTrue($this->private_test_mime_type("image/gif")); - $this->assertTrue($this->private_test_mime_type("image/ief")); - $this->assertTrue($this->private_test_mime_type("image/jpeg")); - $this->assertTrue($this->private_test_mime_type("image/pcx")); - $this->assertTrue($this->private_test_mime_type("image/png")); - $this->assertTrue($this->private_test_mime_type("image/svg+xml")); - $this->assertTrue($this->private_test_mime_type("image/tiff")); - $this->assertTrue($this->private_test_mime_type("image/vnd.djvu")); - $this->assertTrue($this->private_test_mime_type("image/vnd.microsoft.icon")); - $this->assertTrue($this->private_test_mime_type("image/vnd.wap.wbmp")); - $this->assertTrue($this->private_test_mime_type("image/x-cmu-raster")); - $this->assertTrue($this->private_test_mime_type("image/x-coreldraw")); - $this->assertTrue($this->private_test_mime_type("image/x-coreldrawpattern")); - $this->assertTrue($this->private_test_mime_type("image/x-coreldrawtemplate")); - $this->assertTrue($this->private_test_mime_type("image/x-corelphotopaint")); - $this->assertTrue($this->private_test_mime_type("image/x-jg")); - $this->assertTrue($this->private_test_mime_type("image/x-jng")); - $this->assertTrue($this->private_test_mime_type("image/x-ms-bmp")); - $this->assertTrue($this->private_test_mime_type("image/x-photoshop")); - $this->assertTrue($this->private_test_mime_type("image/x-portable-anymap")); - $this->assertTrue($this->private_test_mime_type("image/x-portable-bitmap")); - $this->assertTrue($this->private_test_mime_type("image/x-portable-graymap")); - $this->assertTrue($this->private_test_mime_type("image/x-portable-pixmap")); - $this->assertTrue($this->private_test_mime_type("image/x-rgb")); - $this->assertTrue($this->private_test_mime_type("image/x-xbitmap")); - $this->assertTrue($this->private_test_mime_type("image/x-xpixmap")); - $this->assertTrue($this->private_test_mime_type("image/x-xwindowdump")); - $this->assertTrue($this->private_test_mime_type("message/rfc822")); - $this->assertTrue($this->private_test_mime_type("model/iges")); - $this->assertTrue($this->private_test_mime_type("model/mesh")); - $this->assertTrue($this->private_test_mime_type("model/vrml")); - $this->assertTrue($this->private_test_mime_type("text/calendar")); - $this->assertTrue($this->private_test_mime_type("text/css")); - $this->assertTrue($this->private_test_mime_type("text/csv")); - $this->assertTrue($this->private_test_mime_type("text/h323")); - $this->assertTrue($this->private_test_mime_type("text/html")); - $this->assertTrue($this->private_test_mime_type("text/iuls")); - $this->assertTrue($this->private_test_mime_type("text/mathml")); - $this->assertTrue($this->private_test_mime_type("text/plain")); - $this->assertTrue($this->private_test_mime_type("text/richtext")); - $this->assertTrue($this->private_test_mime_type("text/scriptlet")); - $this->assertTrue($this->private_test_mime_type("text/tab-separated-values")); - $this->assertTrue($this->private_test_mime_type("text/texmacs")); - $this->assertTrue($this->private_test_mime_type("text/vnd.sun.j2me.app-descriptor")); - $this->assertTrue($this->private_test_mime_type("text/vnd.wap.wml")); - $this->assertTrue($this->private_test_mime_type("text/vnd.wap.wmlscript")); - $this->assertTrue($this->private_test_mime_type("text/x-bibtex")); - $this->assertTrue($this->private_test_mime_type("text/x-boo")); - $this->assertTrue($this->private_test_mime_type("text/x-c++hdr")); - $this->assertTrue($this->private_test_mime_type("text/x-c++src")); - $this->assertTrue($this->private_test_mime_type("text/x-chdr")); - $this->assertTrue($this->private_test_mime_type("text/x-component")); - $this->assertTrue($this->private_test_mime_type("text/x-csh")); - $this->assertTrue($this->private_test_mime_type("text/x-csrc")); - $this->assertTrue($this->private_test_mime_type("text/x-diff")); - $this->assertTrue($this->private_test_mime_type("text/x-dsrc")); - $this->assertTrue($this->private_test_mime_type("text/x-haskell")); - $this->assertTrue($this->private_test_mime_type("text/x-java")); - $this->assertTrue($this->private_test_mime_type("text/x-literate-haskell")); - $this->assertTrue($this->private_test_mime_type("text/x-moc")); - $this->assertTrue($this->private_test_mime_type("text/x-pascal")); - $this->assertTrue($this->private_test_mime_type("text/x-pcs-gcd")); - $this->assertTrue($this->private_test_mime_type("text/x-perl")); - $this->assertTrue($this->private_test_mime_type("text/x-python")); - $this->assertTrue($this->private_test_mime_type("text/x-setext")); - $this->assertTrue($this->private_test_mime_type("text/x-sh")); - $this->assertTrue($this->private_test_mime_type("text/x-tcl")); - $this->assertTrue($this->private_test_mime_type("text/x-tex")); - $this->assertTrue($this->private_test_mime_type("text/x-vcalendar")); - $this->assertTrue($this->private_test_mime_type("text/x-vcard")); - $this->assertTrue($this->private_test_mime_type("video/3gpp")); - $this->assertTrue($this->private_test_mime_type("video/dl")); - $this->assertTrue($this->private_test_mime_type("video/dv")); - $this->assertTrue($this->private_test_mime_type("video/fli")); - $this->assertTrue($this->private_test_mime_type("video/gl")); - $this->assertTrue($this->private_test_mime_type("video/mp4")); - $this->assertTrue($this->private_test_mime_type("video/mpeg")); - $this->assertTrue($this->private_test_mime_type("video/ogg")); - $this->assertTrue($this->private_test_mime_type("video/quicktime")); - $this->assertTrue($this->private_test_mime_type("video/vnd.mpegurl")); - $this->assertTrue($this->private_test_mime_type("video/x-flv")); - $this->assertTrue($this->private_test_mime_type("video/x-la-asf")); - $this->assertTrue($this->private_test_mime_type("video/x-m4v")); - $this->assertTrue($this->private_test_mime_type("video/x-mng")); - $this->assertTrue($this->private_test_mime_type("video/x-ms-asf")); - $this->assertTrue($this->private_test_mime_type("video/x-ms-wm")); - $this->assertTrue($this->private_test_mime_type("video/x-ms-wmv")); - $this->assertTrue($this->private_test_mime_type("video/x-ms-wmx")); - $this->assertTrue($this->private_test_mime_type("video/x-ms-wvx")); - $this->assertTrue($this->private_test_mime_type("video/x-msvideo")); - $this->assertTrue($this->private_test_mime_type("video/x-sgi-movie")); - $this->assertTrue($this->private_test_mime_type("x-conference/x-cooltalk")); - $this->assertTrue($this->private_test_mime_type("x-epoc/x-sisx-app")); - $this->assertTrue($this->private_test_mime_type("x-world/x-vrml")); + // Test the mapping list. + foreach ($mime_type_list as $ext => $type) { + $detected_ext = $mime_detect->getExtension($type); + $detected_mimetype = $mime_detect->getMimetype($ext); + $this->assertEqual($detected_ext, $ext, "The detected extension:$detected_ext matched the expected extension:$ext"); + $this->assertEqual($detected_mimetype, $type, "The detected mimetype:$detected_mimetype, matched the expected mimetype:$type."); + } + // Test invalid mime type. + $result = $mime_detect->getExtension("obviously_not_a_valid_mimetype"); + $default = MimeDetect::DEFAULT_EXTENSION; + $this->assertEqual($result, $default, "MimeDetect returned:$result which should match generic mimetype:$default when an invalid extension was given."); + // Test invalid extension. + $result = $mime_detect->getMimetype("banana.aqswswswerawerqfasdzc"); + $default = MimeDetect::DEFAULT_MIMETYPE; + $this->assertEqual($result, $default, "MimeDetect returned:$result a generic extension which should match:$default."); } }