Bug 19605: Update expandTemplate to expand_template method name
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
7233681b6c
commit
513657b09a
|
|
@ -761,7 +761,7 @@ sub custom_capability {
|
|||
request => $self,
|
||||
other => $params,
|
||||
});
|
||||
return $self->expandTemplate($response);
|
||||
return $self->expand_template($response);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
|
@ -826,7 +826,7 @@ sub backend_illview {
|
|||
request => $self,
|
||||
other => $params,
|
||||
});
|
||||
return $self->expandTemplate($response) if $response;
|
||||
return $self->expand_template($response) if $response;
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
|
@ -844,7 +844,7 @@ sub backend_migrate {
|
|||
request => $self,
|
||||
other => $params,
|
||||
});
|
||||
return $self->expandTemplate($response) if $response;
|
||||
return $self->expand_template($response) if $response;
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
|
@ -869,7 +869,7 @@ sub backend_confirm {
|
|||
request => $self,
|
||||
other => $params,
|
||||
});
|
||||
return $self->expandTemplate($response);
|
||||
return $self->expand_template($response);
|
||||
}
|
||||
|
||||
=head3 backend_update_status
|
||||
|
|
@ -878,7 +878,7 @@ sub backend_confirm {
|
|||
|
||||
sub backend_update_status {
|
||||
my ( $self, $params ) = @_;
|
||||
return $self->expandTemplate($self->_backend->update_status($params));
|
||||
return $self->expand_template($self->_backend->update_status($params));
|
||||
}
|
||||
|
||||
=head3 backend_cancel
|
||||
|
|
@ -897,7 +897,7 @@ sub backend_cancel {
|
|||
other => $params
|
||||
});
|
||||
|
||||
return $self->expandTemplate($result);
|
||||
return $self->expand_template($result);
|
||||
}
|
||||
|
||||
=head3 backend_renew
|
||||
|
|
@ -910,7 +910,7 @@ The standard interface method allowing for request renewal queries.
|
|||
|
||||
sub backend_renew {
|
||||
my ( $self ) = @_;
|
||||
return $self->expandTemplate(
|
||||
return $self->expand_template(
|
||||
$self->_backend->renew({
|
||||
request => $self,
|
||||
})
|
||||
|
|
@ -972,7 +972,7 @@ sub backend_create {
|
|||
|
||||
# ... simple case: we're not at 'commit' stage.
|
||||
my $stage = $result->{stage};
|
||||
return $self->expandTemplate($result)
|
||||
return $self->expand_template($result)
|
||||
unless ( 'commit' eq $stage );
|
||||
|
||||
# ... complex case: commit!
|
||||
|
|
@ -1005,7 +1005,7 @@ sub backend_create {
|
|||
$result = $unmediated_result if $unmediated_result;
|
||||
}
|
||||
|
||||
return $self->expandTemplate($result);
|
||||
return $self->expand_template($result);
|
||||
}
|
||||
|
||||
=head3 backend_get_update
|
||||
|
|
@ -1030,15 +1030,15 @@ sub backend_get_update {
|
|||
return $response;
|
||||
}
|
||||
|
||||
=head3 expandTemplate
|
||||
=head3 expand_template
|
||||
|
||||
my $params = $abstract->expandTemplate($params);
|
||||
my $params = $abstract->expand_template($params);
|
||||
|
||||
Return a version of $PARAMS augmented with our required template path.
|
||||
|
||||
=cut
|
||||
|
||||
sub expandTemplate {
|
||||
sub expand_template {
|
||||
my ( $self, $params ) = @_;
|
||||
my $backend = $self->_backend->name;
|
||||
# Generate path to file to load
|
||||
|
|
|
|||
|
|
@ -723,15 +723,15 @@ subtest 'Backend core methods' => sub {
|
|||
# Now load the mocked backend
|
||||
$illrq->_backend($backend);
|
||||
|
||||
# expandTemplate:
|
||||
is_deeply($illrq->expandTemplate({ test => 1, method => "bar" }),
|
||||
# expand_template:
|
||||
is_deeply($illrq->expand_template({ test => 1, method => "bar" }),
|
||||
{
|
||||
test => 1,
|
||||
method => "bar",
|
||||
template => "/tmp/Mock/intra-includes/bar.inc",
|
||||
opac_template => "/tmp/Mock/opac-includes/bar.inc",
|
||||
},
|
||||
"ExpandTemplate");
|
||||
"expand_template");
|
||||
|
||||
# backend_create
|
||||
# we are testing simple cases.
|
||||
|
|
|
|||
Loading…
Reference in New Issue