roundcubemail/program/include/rcmail_install.php
public function check_mime_detection()
    {
        $errors = array();
        $files  = array(
            'program/resources/tinymce/video.png' => 'image/png',
            'program/resources/blank.tiff'        => 'image/tiff',
            'program/resources/blocked.gif'       => 'image/gif',
        );

        foreach ($files as $path => $expected) {
            $mimetype = rcube_mime::file_content_type(INSTALL_PATH . $path, basename($path));
            if ($mimetype != $expected) {
                $errors[] = array($path, $mimetype, $expected);
            }
        }

        return $errors;
    }
public function check_mime_detection()
    {
        $errors = array();
        $files  = array(
            'program/resources/tinymce/video.png' => 'image/png',
            'program/resources/blank.tiff'        => 'image/tiff',
            'program/resources/blocked.gif'       => 'image/gif',
        );

        foreach ($files as $path => $expected) {
            $mimetype = rcube_mime::file_content_type(INSTALL_PATH . $path, basename($path));
            if ($mimetype != $expected) {
                $errors[] = array($path, $mimetype, $expected);
            }
        }

        return $errors;
    }
public function check_mime_detection ( ) { $ errors = array ( ) ; $ files = array ( 'program/resources/tinymce/video.png' => 'image/png' , 'program/resources/blank.tiff' => 'image/tiff' , 'program/resources/blocked.gif' => 'image/gif' , ) ; foreach ( $ files as $ path => $ expected ) { $ mimetype = rcube_mime :: file_content_type ( INSTALL_PATH . $ path , basename ( $ path ) ) ; if ( $ mimetype != $ expected ) { $ errors [ ] = array ( $ path , $ mimetype , $ expected ) ; } } return $ errors ; }
Try to detect some file's mimetypes to test the correct behavior of fileinfo
Try to detect some file s mimetypes to test the correct behavior of fileinfo