|
Revision 18806, 511 bytes
(checked in by lopnor, 5 years ago)
|
|
lang/perl/App-Hachero: first import
|
| Line | |
|---|
| 1 | use strict; |
|---|
| 2 | use warnings; |
|---|
| 3 | use Test::More tests => 11; |
|---|
| 4 | use App::Hachero; |
|---|
| 5 | |
|---|
| 6 | BEGIN { |
|---|
| 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 | } |
|---|