<< Previous Contents Next >>

Dynamic Mock Example: Playback/verify phase

is( $found, '/tmp/template/testing.tmpl',
    'find_file() returned right value from package' );
is( $mock_pkg->call_pos(7), 'find_file',
    'find_file() called correct package method' );
is( $mock_pkg->call_args_pos(7,1), $mock_pkg,
    'find_file() passed correct arguments to package method' );
is( $mock_pkg->call_args_pos(7,2), 'template/testing.tmpl',
    'find_file() passed correct arguments to package method' );