Catalyst-Plugin-I18N-PathPrefixGeoIP

 view release on metacpan or  search on metacpan

t/lib/TestUtils.pm  view on Meta::CPAN

package TestUtils;

use strict;
use warnings;

use base qw/ Exporter /;

use HTTP::Request::Common;
use Catalyst::Test 'TestApp';
use Data::Dumper;

use Test::Most;
use Test::Deep;

=head1 NAME

TestUtils - Utilities for testing Catalyst::Plugin::I18N::PathPrefixGeoIP

=head1 SYNOPSIS

  run_prepare_path_prefix_tests(@tests);

=head1 DESCRIPTION

=head1 EXPORTS

Optional exports: L</run_prepare_path_prefix_tests>

=cut

our @EXPORT_OK = qw/
  &run_prepare_path_prefix_tests
/;

=head1 METHODS

=cut

=head2 run_prepare_path_prefix_tests

  run_prepare_path_prefix_tests(@tests);

Runs all the tests in C<@tests>.

Each element of C<@tests> is a hashref, with the following key-value pairs:

=over

=item config

An arrayref that describes the configuration of the module. The corresponding
key-value pairs of C<< $c->config->{'Plugin::I18N::PathPrefixGeoIP'} >> are set to
these values before the request.

=item request

An arrayref that describes the request.

It can contain the following key-value pairs:

=over

=item path

The path part of the URI to request.

=item accept_language



( run in 0.971 second using v1.01-cache-2.11-cpan-acf6aa7dc9e )