public function __construct()
    {
    }
    public function loadFile()
    {
    }
    public function save($fileDest)
    {
        return $fileDest;
    }
}
// prepare some test data
$config_source = array('config_key' => null, 'thumb_dir' => '%s/thumbnails', 'path_method' => null, 'keep_original' => true, 'on_demand' => true, 'on_save' => true, 'strict' => false, 'default' => 'cover', 'path_method' => 'get%sPath', 'fields' => array('cover' => array('formats' => array('homepage' => '50x50', 'full' => '500x500', 'default' => 'homepage'), 'thumb_dir' => '%s/coverThumbnails'), 'side' => array('formats' => array('homepage' => '50x150'), 'thumb_dir' => '%s/myThumbnails')));
$t->diag('configuration handling');
sfConfig::set('app_thumbnailable', $config_source);
$thumbnailable = new Thumbnailable(array('config_key' => 'thumbnailable'));
$t->is($thumbnailable->getOptions(), $config_source, '__construct() fetches config from config_key');
$t->is($thumbnailable->getOption('thumb_dir'), '%s/thumbnails', 'getOption() retrieves top-level option when no field is given');
$t->is($thumbnailable->getOption('thumb_dir', 'cover'), '%s/coverThumbnails', 'getOption() retrieves field-level option when exists');
$t->is($thumbnailable->getOption('foo'), null, 'getOption() returns null for non-existent option');
$t->is($thumbnailable->hasFormat('homepage', 'cover'), true, 'hasFormat() detects format existence');
$t->is($thumbnailable->hasFormat('foo', 'cover'), false, 'hasFormat() detects format inexistence');
$t->is($thumbnailable->getFormat('homepage', 'cover'), '50x50', 'getFormat() retrieves the right format for the right field');
$t->is($thumbnailable->getFormat('foo', 'cover'), null, 'getFormat() returns null for non-existent formats');
$config_one_field = $config_source;
unset($config_one_field['fields']['side'], $config_one_field['default']);
$thumbnailable = new ThumbnailableMock($config_one_field);
$thumbnailable->setInvokerMock($invokerMock);
$t->is($thumbnailable->guessArguments(array()), array('cover', '50x50'), 'guessArguments() detects a field if it\'s the only one');
unset($config_one_field);
$thumbnailable = new ThumbnailableMock($config_source);
 public function getThumbnailPath($field, $format, $absolute = false)
 {
     return parent::getThumbnailPath($field, $format, $absolute);
 }