Test::Environment::Plugin::Apache2::Apache2::RequestRec - fake Apache2::RequestRec for Test::Environment
use Test::Environment qw{ Apache2 }; my $request = Apache2::RequestRec->new( 'headers_in' => { 'Accept-Encoding' => 'xyz,gzip' }, 'hostname' => 'with.the.man.sk', 'uri' => '/index.html', 'args' => 'id=me', ); is( My::App:Apache2::Index::handler($request), Apache2::Const::REDIRECT, ); is( $request->headers_out->get('Location'), 'http://with.the.man.sk/me/', );
Will populate Apache2::RequestRec namespace with fake methods that can be used for testing.
hostname uri apr_pool args get_server_port dir_config status content_type method protocol
Object constructor.
Get/Set notes.
Get/Set pnotes.
just calls $self->request_rec(@_);
Returns Apache2::RequestRec.
Sets CGI %ENV variables based on current RequestRec object.
empty call
Jozef Kutej
To install Test::Environment, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Environment
CPAN shell
perl -MCPAN -e shell install Test::Environment
For more information on module installation, please visit the detailed CPAN module installation guide.