From 93a1e0fe6bcdc9364c6dbbce27f2f928252d8f4f Mon Sep 17 00:00:00 2001 From: Lari Taskula Date: Tue, 15 Sep 2015 16:57:32 +0300 Subject: [PATCH] Bug 14748: (follow-up) Fix $testPackageName --- t/lib/RESTTest.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/t/lib/RESTTest.pm b/t/lib/RESTTest.pm index 10bd4c1..53ba900 100644 --- a/t/lib/RESTTest.pm +++ b/t/lib/RESTTest.pm @@ -37,7 +37,7 @@ use Koha::Exception::BadParameter; =cut -our $testImplementationMainPackage = 't::db_dependent::Api'; +our $testImplementationMainPackage = 't::db_dependent'; sub new { my ($class, $params) = @_; @@ -63,7 +63,7 @@ sub _validateParams { ##Actually check the params unless ($params->{basePath}) { - $params->{basePath} = 'v1'; + $params->{basePath} = '/api/v1'; } if ($params->{pathsObjectPath}) { @@ -104,7 +104,9 @@ sub _buildPackageAndSubroutineName { my ($self) = @_; my $bp = $self->get_basePath(); - $bp =~ s/\///g; + $bp =~ s!^/!!; + my @bp = map {ucfirst($_)} split('/', $bp); + $bp = join('::', @bp); my ($sModule, $sPathTail) = ($1, $2) if $self->get_pathsObjectPath() =~ /^\/(\w+)\/?(.*)$/; $sPathTail =~ s/\{.*?\}/_n_/g; -- 1.9.1