Skip to content

Commit

Permalink
Item13897: Completing the previous commit
Browse files Browse the repository at this point in the history
TestApp.pm somehow was overlooked...
  • Loading branch information
vrurg committed Nov 30, 2016
1 parent 1c1672f commit 9bdfe54
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions UnitTestContrib/lib/Unit/TestApp.pm
Expand Up @@ -81,6 +81,21 @@ has engineParams => (

=begin TML
---++ ObjectAttribute cfgParams -> hash
This is a hash of parameters to be passed over to =Foswiki::Config=
constructor.
=cut

has cfgParams => (
is => 'rw',
lazy => 1,
builder => 'prepareCfgParams',
);

=begin TML
#AttrCallbacks
---++ ObjectAttribute callbacks -> hash
Expand Down Expand Up @@ -185,6 +200,13 @@ around _prepareEngine => sub {
return $orig->( $this, %{ $this->engineParams } );
};

around _prepareConfig => sub {
my $orig = shift;
my $this = shift;

return $this->create( 'Foswiki::Config', %{ $this->cfgParams }, );
};

around handleRequest => sub {
my $orig = shift;
my $this = shift;
Expand All @@ -204,6 +226,10 @@ around handleRequest => sub {
return $rc;
};

sub prepareCfgParams {
return {};
}

=begin TML
---++ Examples
Expand Down

0 comments on commit 9bdfe54

Please sign in to comment.