4 eval { require Test::MockObject; };
6 plan skip_all => 'skip because Test::MockObject not found';
12 my $r = Test::MockObject->new();
14 $r->set_always('dir_config', '100x75');
16 my ($width, $height) = Apache::Gallery::get_thumbnailsize($r, 640, 480);
17 is ($width, 100, 'Width');
18 is ($height, 75, 'Height');
20 ($width, $height) = Apache::Gallery::get_thumbnailsize($r, 480, 640);
21 is ($width, 56, 'Height rotated');
22 is ($height, 75, 'Width rotated');