NAME

Test::Environment::Plugin::Apache2::Apache2::RequestRec - fake Apache2::RequestRec for Test::Environment

SYNOPSIS

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/',
);

DESCRIPTION

Will populate Apache2::RequestRec namespace with fake methods that can be used for testing.

PROPERTIES

hostname
uri
apr_pool
args
get_server_port
dir_config
status
content_type
method
protocol

METHODS

new()

Object constructor.

notes

Get/Set notes.

pnotes

Get/Set pnotes.

APR::Table methods

apt_table() =head3 subprocess_env() =head3 headers_in() =head3 headers_out() =head3 dir_config()

Apache2::Filter::r

just calls $self->request_rec(@_);

Apache2::Filter::request_rec

Returns Apache2::RequestRec.

populate_env

Sets CGI %ENV variables based on current RequestRec object.

rflush

empty call

AUTHOR

Jozef Kutej