Apache2-Dummy-RequestRec

 view release on metacpan or  search on metacpan

RequestRec.pm  view on Meta::CPAN

     
     ok($r->headers_out->{'Content-Length'} == $cl, "Content-Length == $cl");
     
     ok($r->headers_out->{'Content-Type'} eq $ct, "Content-Type: '$ct'");
     
     my $result = $ct =~ /json/i ? from_json(unescapeURIString($body)) : $body;
     
     ok(Compare($result, $exp_res), "body");
 }
 
 test_http_handler('My::Apache::Request::handler', { redirect => "https://localhost/" }, 55, 'application/json', login => 'mylogin', password => 'mypasswd');

=head1 DESCRIPTION

B<Apache2::Dummy::RequestRec> can be used to test Apache2 mod_perl request handlers without an actual web server running. The difference to other similar modules is, that it uses L<APR::Table> and L<APR::Pool> to act much more like a real Apache.

=head1 AUTHOR

Jens Fischer <jeff@lipsia.de>

=head1 COPYRIGHT AND LICENSE



( run in 0.837 second using v1.01-cache-2.11-cpan-49f99fa48dc )