beginnings of thumbnail generation test

This commit is contained in:
Colin Kuskie 2007-07-13 04:38:50 +00:00
parent f408538cb5
commit 8b973604cd

View file

@ -15,6 +15,7 @@ our $todo;
use WebGUI::Test;
use WebGUI::Session;
use WebGUI::Image;
use WebGUI::Storage::Image;
use File::Spec;
@ -110,6 +111,16 @@ foreach my $extTest ( @{ $extensionTests } ) {
is( $imageStore->isImage($extTest->{filename}), $extTest->{isImage}, $extTest->{comment} );
}
####################################################
#
# generateThumbnail
#
####################################################
my $thumbStore = WebGUI::Storage::Image->create($session);
my $square = WebGUI::Image->new($session, 500, 500);
$square->setBackgroundColor('#FF0000');
$square->saveToStorageLocation($thumbStore, 'square.png');
####################################################
#
# getSizeInPixels
@ -127,7 +138,7 @@ TODO: {
END {
foreach my $stor (
$imageStore,
$imageStore, $thumbStore,
) {
ref $stor eq "WebGUI::Storage::Image" and $stor->delete;
}