ZF-9278: Problems with magic files
On some systems the magic file can't used by finfo. On using it php errors will be reported and tests fails. I know this is not directly a ZF problem but Zend_Validate_File_Mimetype should throw an exception on setting an invalid magic file or if finfo isn't supported by php and the magic file can't used.
Additionally the first found magic files will be used (if not set) without testing its format.
To solve this 1. use the function based interface of finfo than an invalid magic file can detected and throw an exception 2. use the opened finfo resource (opened on setMagicFile to check format) within isValid 3. throw an exception finfo_file returns false -> it returns application/octed-stream if no matches was found 4. throw an exception on setMagicFile if finfo isn't available 5. set systems magic file on constructor (if no option) but don't throw an exception if invalid (skip magic file if it has an invalid format and check the next) 6. add and use a valid magic file on tests