Bug 16717: Improve variable naming
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 14 Jun 2016 10:18:32 +0000 (11:18 +0100)
committerJulian Maurice <julian.maurice@biblibre.com>
Fri, 1 Jul 2016 07:04:43 +0000 (09:04 +0200)
$category was a categorycode, to help the readability it's better to
name it $categorycode or assign a Category to $category

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f8b73deaec5c7f55d66d52c2ca05d419f4a7c178)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 8ebe3a0a42b8b63a3ef8b1486a30cd3b335d12b9)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

t/db_dependent/Holds.t

index cdc3560..b813c05 100755 (executable)
@@ -34,7 +34,7 @@ my $dbh     = C4::Context->dbh;
 my $branch_1 = $builder->build({ source => 'Branch' })->{ branchcode };
 my $branch_2 = $builder->build({ source => 'Branch' })->{ branchcode };
 
-my $category = $builder->build({ source => 'Category' })->{categorycode};
+my $category = $builder->build({ source => 'Category' });
 
 my $borrowers_count = 5;
 
@@ -60,7 +60,7 @@ foreach (1..$borrowers_count) {
     my $borrowernumber = AddMember(
         firstname =>  'my firstname',
         surname => 'my surname ' . $_,
-        categorycode => $category,
+        categorycode => $category->{categorycode},
         branchcode => $branch_1,
     );
     push @borrowernumbers, $borrowernumber;