root/lang/perl/App-Hachero/trunk/t/plugin/analyze/01_ua.t @ 18806

Revision 18806, 511 bytes (checked in by lopnor, 6 years ago)

lang/perl/App-Hachero: first import

Line 
1use strict;
2use warnings;
3use Test::More tests => 11;
4use App::Hachero;
5
6BEGIN {
7    use_ok 'App::Hachero::Plugin::Analyze::UA';
8};
9
10{
11    my $config = {
12        plugins => [
13            {module => 'Analyze::UA'},
14        ]
15    };
16
17    my $app = App::Hachero->new({config => $config});
18    for my $i (1 .. 10) {
19        $app->currentlog({
20                ua => 'Mozilla'
21            });
22        $app->run_hook('analyze');
23        is $app->result->{'App::Hachero::Plugin::Analyze::UA'}->{'Mozilla'}, $i;
24    }
25}
Note: See TracBrowser for help on using the browser.