From 5b7ec36b7f91b0b6a7b77bc910f334871231ab0a Mon Sep 17 00:00:00 2001 From: Kyle Hall Date: Mon, 1 Aug 2022 08:34:17 -0400 Subject: [PATCH] Bug 30612: (QA follow-up) Rename accountlines method to account_lines Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- Koha/Checkout.pm | 8 ++++---- Koha/Old/Checkout.pm | 8 ++++---- t/db_dependent/Koha/Account/Line.t | 2 +- t/db_dependent/Koha/Checkouts.t | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Koha/Checkout.pm b/Koha/Checkout.pm index 61dc30d778..af2bb8bd07 100644 --- a/Koha/Checkout.pm +++ b/Koha/Checkout.pm @@ -79,15 +79,15 @@ sub item { return Koha::Item->_new_from_dbic( $item_rs ); } -=head3 accountlines +=head3 account_lines -my $accountlines = $checkout->accountlines; +my $account_lines = $checkout->account_lines; -Return the checked out accountlines +Return the checked out account_lines =cut -sub accountlines { +sub account_lines { my ( $self ) = @_; my $accountlines_rs = $self->_result->accountlines; return Koha::Account::Lines->_new_from_dbic( $accountlines_rs ); diff --git a/Koha/Old/Checkout.pm b/Koha/Old/Checkout.pm index 91f7072831..6ae20e275f 100644 --- a/Koha/Old/Checkout.pm +++ b/Koha/Old/Checkout.pm @@ -45,15 +45,15 @@ sub item { return Koha::Item->_new_from_dbic( $item_rs ); } -=head3 accountlines +=head3 account_lines -my $accountlines = $checkout->accountlines; +my $account_lines = $checkout->account_lines; -Return the checked out accountlines +Return the checked out account_lines =cut -sub accountlines { +sub account_lines { my ( $self ) = @_; my $accountlines_rs = $self->_result->accountlines; return Koha::Account::Lines->_new_from_dbic( $accountlines_rs ); diff --git a/t/db_dependent/Koha/Account/Line.t b/t/db_dependent/Koha/Account/Line.t index c2436b7516..71981b4b1e 100755 --- a/t/db_dependent/Koha/Account/Line.t +++ b/t/db_dependent/Koha/Account/Line.t @@ -346,7 +346,7 @@ subtest 'apply() tests' => sub { } )->store(); - my $a = $checkout->accountlines->next; + my $a = $checkout->account_lines->next; is( $a->id, $accountline->id, "Koha::Checkout::accountlines returns the related acountline" ); # Enable renewing upon fine payment diff --git a/t/db_dependent/Koha/Checkouts.t b/t/db_dependent/Koha/Checkouts.t index 8ca855d27c..232a576d1a 100755 --- a/t/db_dependent/Koha/Checkouts.t +++ b/t/db_dependent/Koha/Checkouts.t @@ -110,7 +110,7 @@ subtest 'item' => sub { 'Koha::Checkout->item should return the correct item' ); }; -subtest 'accountlines' => sub { +subtest 'account_lines' => sub { plan tests => 3; my $accountline = Koha::Account::Line->new( @@ -128,7 +128,7 @@ subtest 'accountlines' => sub { } )->store(); - my $accountlines = $retrieved_checkout_1->accountlines; + my $accountlines = $retrieved_checkout_1->account_lines; is( ref($accountlines), 'Koha::Account::Lines', 'Koha::Checkout->accountlines should return a Koha::Item' ); -- 2.39.5