CGI-Wiki-Simple
view release on metacpan or search on metacpan
isa_ok($wiki->wiki, 'CGI::Wiki', '$wiki->wiki');
# Now check our decode_runmode routine:
use vars qw( $path_info %node_info %params );
use vars qw( @runmodes );
@runmodes = qw(display preview commit);
# Declare what we expect :
sub is_path_info($$$$) {
my ($path_info,$expected_runmode,$expected_node_title,$comment) = @_;
my %node_info = (content => 'Test content', checksum => 1);
my $cgi = Test::MockObject->new()
->set_always( param => undef )
->mock( path_info => sub { $path_info } );
my $self = Test::MockObject->new()
->mock( param => sub { my $result = $params{$_[1]}; $params{$_[1]} = $_[2] if scalar @_ == 3; $result } )
->mock( retrieve_node => sub { %node_info } )
->set_always( format => undef )
( run in 0.769 second using v1.01-cache-2.11-cpan-65fba6d93b7 )