The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Eve::HttpResourceGraphTestBase - a base class for all Graph API HTTP resource classes.

SYNOPSIS

    package BogusHttpResourceTest;

    use parent qw(Eve::HttpResourceGraphTestBase);

    # put your HTTP resource tests here

Get a ready HTTP dispatcher object for your test case:

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

DESCRIPTION

Eve::HttpResourceGraphTestBase is the class that provides all required test cases for every Graph API HTTP resource class.

METHODS

setup()

set_dispatcher()

Returns an Eve::HttpDispatcher object ready for HTTP resource testing. To get a ready request object to be used as an argument a Eve::PsgiStub stub class can be used.

Arguments

  • Any Eve::HttpRequest object.

do_test_read()

Performs all tests for the GET functionality of a Graph API resource.

do_test_publish()

Performs all tests for the POST functionality of a Graph API resource.

do_test_remove()

Performs all tests for the DELETE functionality of a Graph API resource.

do_test()

Performs all tests for specified data and request method.

set_session_parameters()

Sets session parameters for the current test.

mock_gateway_methods()

Adds gateway method mocking with provided data.

assert_response()

Checks the response of a resource and compares it to the one specified in the arguments.

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