View | Details | Raw Unified | Return to bug 14748
Collapse All | Expand All

(-)a/t/lib/RESTTest.pm (-4 / +5 lines)
Lines 37-43 use Koha::Exception::BadParameter; Link Here
37
37
38
=cut
38
=cut
39
39
40
our $testImplementationMainPackage = 't::db_dependent::Api';
40
our $testImplementationMainPackage = 't::db_dependent';
41
41
42
sub new {
42
sub new {
43
    my ($class, $params) = @_;
43
    my ($class, $params) = @_;
Lines 63-69 sub _validateParams { Link Here
63
63
64
    ##Actually check the params
64
    ##Actually check the params
65
    unless ($params->{basePath}) {
65
    unless ($params->{basePath}) {
66
        $params->{basePath} = 'v1';
66
        $params->{basePath} = '/api/v1';
67
    }
67
    }
68
68
69
    if ($params->{pathsObjectPath}) {
69
    if ($params->{pathsObjectPath}) {
Lines 104-110 sub _buildPackageAndSubroutineName { Link Here
104
    my ($self) = @_;
104
    my ($self) = @_;
105
105
106
    my $bp = $self->get_basePath();
106
    my $bp = $self->get_basePath();
107
    $bp =~ s/\///g;
107
    $bp =~ s!^/!!;
108
    my @bp = map {ucfirst($_)} split('/', $bp);
109
    $bp = join('::', @bp);
108
110
109
    my ($sModule, $sPathTail) = ($1, $2) if $self->get_pathsObjectPath() =~ /^\/(\w+)\/?(.*)$/;
111
    my ($sModule, $sPathTail) = ($1, $2) if $self->get_pathsObjectPath() =~ /^\/(\w+)\/?(.*)$/;
110
    $sPathTail =~ s/\{.*?\}/_n_/g;
112
    $sPathTail =~ s/\{.*?\}/_n_/g;
111
- 

Return to bug 14748