checkResult($t, 150, 150, 'image/jpeg');
    $t->todo('handles image/pjpeg mime type');
    //$t->diag('handles image/pjpeg mime type');
    //$thmb = new sfThumbnail(150, 150, false, true, 75, $adapter, array());
    //$thmb->loadFile($data['image/pjpeg']);
    //$thmb->save($result.'.jpg');
    //checkResult($t, 150, 150, 'image/jpeg');
    $t->diag('creates inflated thumbnail');
    $thmb = new sfThumbnail(200, 200, false, true, 75, $adapter, array());
    $thmb->loadFile($data['image/gif']);
    $thmb->save($result . '.gif');
    checkResult($t, 200, 200, 'image/gif');
    $t->diag('creates image from string');
    $thmb = new sfThumbnail(200, 200, false, true, 75, $adapter, array());
    $blob = file_get_contents($data['blob']);
    $thmb->loadData($blob, 'image/jpeg');
    $thmb->save($result . '.jpg', 'image/jpeg');
    checkResult($t, 200, 200, 'image/jpeg');
    // imagemagick-specific tests
    if ($adapter == 'sfImageMagickAdapter') {
        $t = new my_lime_test($tests_imagemagick, new lime_output_color());
        $t->diag('creates thumbnail from pdf', $adapter);
        $thmb = new sfThumbnail(150, 150, true, true, 75, $adapter, array('extract' => 1));
        $thmb->loadFile($data['document/pdf']);
        $thmb->save($result . '.jpg');
        checkResult($t, 150, 116, 'image/jpeg');
    }
}
function checkResult($t, $width, $height, $mime)
{
    global $mimeMap;