Test::WWW::Mechanize::CGI - Test CGI applications with Test::WWW::Mechanize
use Test::More tests => 3; use CGI; use Test::WWW::Mechanize::CGI; my $mech = Test::WWW::Mechanize::CGI->new; $mech->cgi( sub { my $q = CGI->new; print $q->header, $q->start_html('Hello World'), $q->h1('Hello World'), $q->end_html; }); $mech->get_ok('http://localhost/'); $mech->title_is('Hello World'); $mech->content_contains('Hello World');
Provides a convenient way of testing CGI applications without a external daemon.
Christian Hansen, ch@ngmedia.com
ch@ngmedia.com
This library is free software. You can redistribute it and/or modify it under the same terms as perl itself.
To install Test::WWW::Mechanize::CGI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::WWW::Mechanize::CGI
CPAN shell
perl -MCPAN -e shell install Test::WWW::Mechanize::CGI
For more information on module installation, please visit the detailed CPAN module installation guide.