Add some comments on uses for fake_{hook,config}
This commit is contained in:
parent
7f357af1c2
commit
0204fb0f18
@ -119,6 +119,8 @@ sub run_plugin_tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub fake_hook {
|
sub fake_hook {
|
||||||
|
# Used to test core code against different potential plugins
|
||||||
|
# it will interact with
|
||||||
my ( $self, $hook, $sub ) = @_;
|
my ( $self, $hook, $sub ) = @_;
|
||||||
unshift @{ $self->hooks->{$hook} ||= [] },
|
unshift @{ $self->hooks->{$hook} ||= [] },
|
||||||
{
|
{
|
||||||
@ -136,6 +138,7 @@ sub unfake_hook {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub fake_config {
|
sub fake_config {
|
||||||
|
# Used to test code against various possible configurations
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $fake_config = {@_};
|
my $fake_config = {@_};
|
||||||
$self->fake_hook( 'config',
|
$self->fake_hook( 'config',
|
||||||
|
Loading…
Reference in New Issue
Block a user