| Test-Environment documentation | view source | Contained in the Test-Environment distribution. |
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
Object constructor.
Get/Set pnote.
just calls $self->request_rec(@_);
Returns Apache2::RequestRec.
Jozef Kutej
| Test-Environment documentation | view source | Contained in the Test-Environment distribution. |