4 use Test::More tests => 4;
10 my $CLASS = 'Excel::Template';
13 my $object = $CLASS->new(
16 isa_ok( $object, $CLASS );
18 ok( $object->write_file( 'filename' ), 'Successfuly wrote file' );
20 my @calls = mock::get_calls;
21 is( join( $/, @calls, '' ), <<__END_EXPECTED__, 'Calls match up' );
22 Spreadsheet::WriteExcel::new( 'filename' )
23 Spreadsheet::WriteExcel::add_format( '' )
24 Spreadsheet::WriteExcel::add_worksheet( '' )
25 Spreadsheet::WriteExcel::Worksheet::new( '' )
26 Spreadsheet::WriteExcel::Worksheet::write( '0', '0', 'before', '1' )
27 Spreadsheet::WriteExcel::Worksheet::insert_image( '0', '1', '/full/path', '0', '0', '0', '0' )
28 Spreadsheet::WriteExcel::Worksheet::write( '0', '2', 'after', '1' )
29 Spreadsheet::WriteExcel::Worksheet::insert_image( '0', '3', '/full/path', '2', '2', '0', '0' )
30 Spreadsheet::WriteExcel::Worksheet::insert_image( '0', '4', '/full/path', '0', '0', '2', '2' )
31 Spreadsheet::WriteExcel::Worksheet::insert_image( '0', '5', '/full/path', '0', '1', '1.1', '0' )
32 Spreadsheet::WriteExcel::close( '' )
38 <cell text="before" />
39 <image path="/full/path" />
41 <image path="/full/path" offset="2,2"/>
42 <image path="/full/path" scale="2,2"/>
43 <image path="/full/path" scale="1.1,0" offset="0,1"/>