1 |
#!/usr/bin/perl |
2 |
use strict; |
3 |
use warnings; |
4 |
|
5 |
my $debug = @ARGV ? 1 : 0; |
6 |
|
7 |
use Test::More tests => 4; |
8 |
use lib 'lib'; |
9 |
|
10 |
use Data::Dump qw/dump/; |
11 |
|
12 |
BEGIN { |
13 |
use_ok('Frey::IconBrowser'); |
14 |
} |
15 |
|
16 |
ok( my $o = Frey::IconBrowser->new( debug => $debug ), 'new' ); |
17 |
diag dump( $o ) if $debug; |
18 |
|
19 |
my @icons = map { "static/icons/$_" } ( qw{ |
20 |
Frey.png |
21 |
Frey/Introspect.png |
22 |
Frey/INC.png |
23 |
Frey/SVK.png |
24 |
Frey/ClassBrowser.png |
25 |
Frey/Session.png |
26 |
Frey/PPI.png |
27 |
Frey/Test/Runner.png |
28 |
Frey/Test/Runner/failed.png |
29 |
Frey/Test/Runner/passed.png |
30 |
Frey/Test/Mock.png |
31 |
Frey/Run.png |
32 |
Frey/VCI.png |
33 |
Frey/Web.png |
34 |
Frey/ClassLoader.png |
35 |
} ); |
36 |
|
37 |
diag dump( @icons ) if $debug; |
38 |
|
39 |
ok( my ($path,$styles) = $o->combine_image( @icons ), 'combine_image' ); |
40 |
diag $path, dump( $styles ) if $debug; |
41 |
|
42 |
ok( my $markup = $o->as_markup, 'as_markup' ); |
43 |
diag $markup if $debug; |
44 |
|