Commit | Line | Data |
b6bc5a5d |
1 | use strict; |
b6bc5a5d |
2 | |
3 | use Test::More tests => 4; |
4 | |
5 | use lib 't'; |
6 | use mock; |
c11fa570 |
7 | mock::reset; |
b6bc5a5d |
8 | |
9 | my $CLASS = 'Excel::Template'; |
10 | use_ok( $CLASS ); |
11 | |
12 | my $object = $CLASS->new( |
13 | filename => 't/005.xml', |
14 | ); |
15 | isa_ok( $object, $CLASS ); |
16 | |
17 | ok( $object->write_file( 'filename' ), 'Something returned' ); |
18 | |
c11fa570 |
19 | my @calls = mock::get_calls; |
b6bc5a5d |
20 | is( join( $/, @calls, '' ), <<__END_EXPECTED__, 'Calls match up' ); |
21 | Spreadsheet::WriteExcel::new( 'filename' ) |
22 | Spreadsheet::WriteExcel::add_format( '' ) |
23 | Spreadsheet::WriteExcel::add_format( 'bold', '1' ) |
24 | Spreadsheet::WriteExcel::add_format( 'hidden', '1' ) |
25 | Spreadsheet::WriteExcel::add_format( 'italic', '1' ) |
26 | Spreadsheet::WriteExcel::add_format( 'locked', '1' ) |
e976988f |
27 | Spreadsheet::WriteExcel::add_format( 'font_outline', '1' ) |
b6bc5a5d |
28 | Spreadsheet::WriteExcel::add_format( 'font_shadow', '1' ) |
29 | Spreadsheet::WriteExcel::add_format( 'font_strikeout', '1' ) |
b6bc5a5d |
30 | Spreadsheet::WriteExcel::add_format( 'shrink', '1' ) |
31 | Spreadsheet::WriteExcel::add_format( 'text_wrap', '1' ) |
32 | Spreadsheet::WriteExcel::add_format( 'text_justlast', '1' ) |
33 | Spreadsheet::WriteExcel::add_format( 'size', '3' ) |
34 | Spreadsheet::WriteExcel::add_format( 'num_format', '3' ) |
35 | Spreadsheet::WriteExcel::add_format( 'underline', '3' ) |
36 | Spreadsheet::WriteExcel::add_format( 'rotation', '3' ) |
37 | Spreadsheet::WriteExcel::add_format( 'indent', '3' ) |
38 | Spreadsheet::WriteExcel::add_format( 'pattern', '3' ) |
39 | Spreadsheet::WriteExcel::add_format( 'border', '3' ) |
40 | Spreadsheet::WriteExcel::add_format( 'bottom', '3' ) |
41 | Spreadsheet::WriteExcel::add_format( 'top', '3' ) |
42 | Spreadsheet::WriteExcel::add_format( 'left', '3' ) |
43 | Spreadsheet::WriteExcel::add_format( 'right', '3' ) |
44 | Spreadsheet::WriteExcel::add_format( 'font', '3' ) |
45 | Spreadsheet::WriteExcel::add_format( 'color', '3' ) |
46 | Spreadsheet::WriteExcel::add_format( 'align', '3' ) |
47 | Spreadsheet::WriteExcel::add_format( 'valign', '3' ) |
48 | Spreadsheet::WriteExcel::add_format( 'bg_color', '3' ) |
49 | Spreadsheet::WriteExcel::add_format( 'fg_color', '3' ) |
50 | Spreadsheet::WriteExcel::add_format( 'border_color', '3' ) |
51 | Spreadsheet::WriteExcel::add_format( 'bottom_color', '3' ) |
52 | Spreadsheet::WriteExcel::add_format( 'top_color', '3' ) |
53 | Spreadsheet::WriteExcel::add_format( 'left_color', '3' ) |
54 | Spreadsheet::WriteExcel::add_format( 'right_color', '3' ) |
55 | Spreadsheet::WriteExcel::add_format( 'bold', '1', 'italic', '1' ) |
56 | Spreadsheet::WriteExcel::add_format( 'bold', '1', 'hidden', '1', 'italic', '1' ) |
57 | Spreadsheet::WriteExcel::close( '' ) |
58 | __END_EXPECTED__ |