| 1 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 1 | ▶ | use Cwd; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use Carp qw(croak carp); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 0 | ▶ | use GD::Image; |
|
Subroutine
BEGIN: called CC=1 SCAR=2.6
| |||
| 6 | use Test::MockObject; | ||
| 7 | use Data::Dumper; | ||
| 8 | use Image::Resize::Path; | ||
| 9 | |||
| 10 | |||
| 11 | use Test::More tests => 1; # last test to print | ||
| 12 | |||
| 13 | |||
| 14 | my $test_obj = Image::Resize::Path->new; | ||
| 15 | $test_obj->supported_images(['png']); | ||
| 16 | my $dest_path = getcwd . '/test_data/dest'; | ||
| 17 | my $src_path = getcwd . '/test_data'; | ||
| 18 | $test_obj->dest_path($dest_path); | ||
| 19 | diag $src_path; | ||
| 20 | $test_obj->src_path($src_path); | ||
| 21 | |||
| 22 | |||
| 23 | my @images = $test_obj->resize_images(100,100); | ||
| 24 | |||
| 25 | diag @images; | ||
| 26 | diag Dumper(\@images); | ||
| 27 | |||
| 28 | is_deeply(\@images, ['test.png']); | ||
| 29 | |||
| 30 | |||