From 37474c3434399669ee9974d1d37c92e254711f96 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 --- 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 61dc30d7789..af2bb8bd074 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 91f70728315..6ae20e275fd 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 c2436b75168..71981b4b1ef 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 8ca855d27c3..232a576d1a9 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.30.2