NAME

POE::Test::Helpers::API - Documentation of POE::Test::Helpers API

VERSION

version 1.11

DESCRIPTION

This is a documentation of the API of POE::Test::Helpers. It is useful if you want to embed POE::Test::Helpers into a more complex testing scheme.

POE::Test::Helpers employs an object that contains both the tests to run, how to run some of these tests and the run method to create a session to hook up to.

The object also has methods you should call from inside events, and it injects calling them into the POE::Session object the run method creates.

METHODS

new

Creates an instance of the object. This does not create a POE::Session instance.

It works with the following attributes:

tests

A hash reference describing tests you want done.

You can read more about them in POE::Test::Helpers.

params_type

The type of parameter checks. Either ordered or unordered.

You find can examples of it in POE::Test::Helpers.

reached_event

Reached event should be run from inside the events. It gives the object details on the event that it can then use to run tests.

Calling this method is injected into any event you want to test in the session returned by the run attribute, defined in POE::Test::Helpers.

    $object->reached_event(
        name   => 'special',
        order  => 3, # we're 4th (counting starts at 0)
        params => [ @_[ ARG0 .. $# ] ], # if any
    );

check_deps

Runs a check of the event dependencies against the tests that were given.

check_order

Runs a check of the order of events against the tests that were given.

check_params

Runs a check of the parameters of events against the tests that were given.

check_all_counts

Requests to run count checks for every event.

check_count

Runs a check of the events' runtime count against the tests that were given.

AUTHOR

Sawyer X, <xsawyerx at cpan.org>

BUGS

Please use the Github Issues tracker.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc POE::Test::Helpers

You can also look for information at:

ACKNOWLEDGEMENTS

I owe a lot of thanks to the following people:

  • Chris (perigrin) Prather

    Thanks for all the comments and ideas. Thanks for MooseX::POE!

  • Rocco (dngor) Caputo

    Thanks for the input and ideas. Thanks for POE!

  • #moose and #poe

    Really great people and constantly helping me with stuff, including one of the core principles in this module.

AUTHOR

  Sawyer X <xsawyerx@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2010 by Sawyer X.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.