aboutsummaryrefslogtreecommitdiff
path: root/t/lib
diff options
context:
space:
mode:
authordakkar <dakkar@luxion>2006-01-28 11:14:52 +0000
committerdakkar <dakkar@luxion>2006-01-28 11:14:52 +0000
commit77591ad357f28be9a727710a1dfc5e044a459000 (patch)
treeb7c854aaad81bb07feab72560f7e79862340bc94 /t/lib
parentil driver fa le due passate, fix #1 (diff)
downloadWebCoso-77591ad357f28be9a727710a1dfc5e044a459000.tar.gz
WebCoso-77591ad357f28be9a727710a1dfc5e044a459000.tar.bz2
WebCoso-77591ad357f28be9a727710a1dfc5e044a459000.zip
pipeline fatte e testate, forse fix #2
git-svn-id: svn://luxion/repos/WebCoso/trunk@142 fcb26f47-9200-0410-b104-b98ab5b095f3
Diffstat (limited to 't/lib')
-rw-r--r--t/lib/WebCoso/Pipeline/Test.pm5
-rw-r--r--t/lib/WebCoso/Step/Step1.pm11
-rw-r--r--t/lib/WebCoso/Step/Step2.pm13
3 files changed, 17 insertions, 12 deletions
diff --git a/t/lib/WebCoso/Pipeline/Test.pm b/t/lib/WebCoso/Pipeline/Test.pm
index 2d13d69..8c339ff 100644
--- a/t/lib/WebCoso/Pipeline/Test.pm
+++ b/t/lib/WebCoso/Pipeline/Test.pm
@@ -3,7 +3,10 @@ use strict;
use warnings;
use base 'WebCoso::Pipeline::Base';
-__PACKAGE__->set_steps(qw(Step1 Step2));
+__PACKAGE__->set_steps(
+ Step1 => {p1 => 1},
+ Step2 => {p2 => 2}
+);
my @calls;
diff --git a/t/lib/WebCoso/Step/Step1.pm b/t/lib/WebCoso/Step/Step1.pm
index 8a36d1d..9b18d16 100644
--- a/t/lib/WebCoso/Step/Step1.pm
+++ b/t/lib/WebCoso/Step/Step1.pm
@@ -1,24 +1,25 @@
package WebCoso::Step::Step1;
+use base 'WebCoso::Step::Base';
use strict;
use warnings;
-my @calls;
-
sub process {
- my ($class,$resource)=@_;
+ my ($self,$resource,$stage)=@_;
my $out='stuff';
- push @calls,{
+ push @{$self->{calls}},{
resource => $resource,
out_res => $out,
+ stage => $stage,
};
return $out;
}
sub get_calls {
- return @calls;
+ my ($self)=@_;
+ return @{$self->{calls}};
}
1;
diff --git a/t/lib/WebCoso/Step/Step2.pm b/t/lib/WebCoso/Step/Step2.pm
index 0868842..0a45e3c 100644
--- a/t/lib/WebCoso/Step/Step2.pm
+++ b/t/lib/WebCoso/Step/Step2.pm
@@ -1,24 +1,25 @@
package WebCoso::Step::Step2;
+use base 'WebCoso::Step::Base';
use strict;
use warnings;
-my @calls;
-
sub process {
- my ($class,$resource)=@_;
+ my ($self,$resource,$stage)=@_;
- my $out='other';
+ my $out='stuff';
- push @calls,{
+ push @{$self->{calls}},{
resource => $resource,
out_res => $out,
+ stage => $stage,
};
return $out;
}
sub get_calls {
- return @calls;
+ my ($self)=@_;
+ return @{$self->{calls}};
}
1;