Igor Zinovyev > Eve > Eve::PsgiStub

Download:
Eve-0.06.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

Eve::PsgiStub - a stub class to easily create mock versions of HTTP requests.

SYNOPSIS ^

    use Eve::PsgiStub;

    my $request = Eve::PsgiStub->get_request(
        'method' => $method_string,
        'uri' => $uri_string,
        'host' => $domain_strin,
        'query' => $query_string,
        'cookie' => $cookie_string);

DESCRIPTION ^

Eve::PsgiStub is a helper abstract factory class that generates HTTP requests for making tests easier.

METHODS ^

get_request()

Returns a Eve::HttpRequest::Psgi object based on arguments. All arguments are optional.

Arguments

uri

a request URI part string, defaults to /,

host

a request host string, defaults to example.localhost,

query

a request URI query string part, defaults to an empty string,

method

a request method string, defaults to GET

body

a request body, defaults to an empty string

cookie

a request Set-Cookie string, defaults to an empty string,

content_type

a request content-type string, defaults to an empty string.

SEE ALSO ^

Eve::Test
Test::Class

LICENSE AND COPYRIGHT ^

Copyright 2010-2013 Sergey Konoplev, Igor Zinovyev.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.

AUTHOR ^

Sergey Konoplev
Igor Zinovyev
syntax highlighting: