From 6a3262de99ba05a49e63ee45e823d9bda87f1efc Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 1 Aug 2022 14:44:04 +0200 Subject: [PATCH] Bug 30612: Rename other occurrences Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- Koha/Checkout.pm | 4 ++-- Koha/Old/Checkout.pm | 4 ++-- Koha/Schema/Result/Issue.pm | 2 +- Koha/Schema/Result/OldIssue.pm | 2 +- t/db_dependent/Koha/Account/Line.t | 2 +- t/db_dependent/Koha/Checkouts.t | 10 +++++----- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Koha/Checkout.pm b/Koha/Checkout.pm index af2bb8bd07..178a8c0da4 100644 --- a/Koha/Checkout.pm +++ b/Koha/Checkout.pm @@ -89,8 +89,8 @@ Return the checked out account_lines sub account_lines { my ( $self ) = @_; - my $accountlines_rs = $self->_result->accountlines; - return Koha::Account::Lines->_new_from_dbic( $accountlines_rs ); + my $account_lines_rs = $self->_result->account_lines; + return Koha::Account::Lines->_new_from_dbic( $account_lines_rs ); } =head3 library diff --git a/Koha/Old/Checkout.pm b/Koha/Old/Checkout.pm index 6ae20e275f..49a7765485 100644 --- a/Koha/Old/Checkout.pm +++ b/Koha/Old/Checkout.pm @@ -55,8 +55,8 @@ Return the checked out account_lines sub account_lines { my ( $self ) = @_; - my $accountlines_rs = $self->_result->accountlines; - return Koha::Account::Lines->_new_from_dbic( $accountlines_rs ); + my $account_lines_rs = $self->_result->account_lines; + return Koha::Account::Lines->_new_from_dbic( $account_lines_rs ); } =head3 library diff --git a/Koha/Schema/Result/Issue.pm b/Koha/Schema/Result/Issue.pm index 7ad235ddf3..9b727a04cc 100644 --- a/Koha/Schema/Result/Issue.pm +++ b/Koha/Schema/Result/Issue.pm @@ -404,7 +404,7 @@ __PACKAGE__->might_have( ); __PACKAGE__->has_many( - "accountlines", + "account_lines", "Koha::Schema::Result::Accountline", { "foreign.issue_id" => "self.issue_id" }, { cascade_copy => 0, cascade_delete => 0 }, diff --git a/Koha/Schema/Result/OldIssue.pm b/Koha/Schema/Result/OldIssue.pm index 1ae3e2f87a..50ef4a82e0 100644 --- a/Koha/Schema/Result/OldIssue.pm +++ b/Koha/Schema/Result/OldIssue.pm @@ -367,7 +367,7 @@ Related object: L =cut __PACKAGE__->has_many( - "accountlines", + "account_lines", "Koha::Schema::Result::Accountline", { "foreign.issue_id" => "self.issue_id" }, { cascade_copy => 0, cascade_delete => 0 }, diff --git a/t/db_dependent/Koha/Account/Line.t b/t/db_dependent/Koha/Account/Line.t index 71981b4b1e..9d29dad3e3 100755 --- a/t/db_dependent/Koha/Account/Line.t +++ b/t/db_dependent/Koha/Account/Line.t @@ -347,7 +347,7 @@ subtest 'apply() tests' => sub { )->store(); my $a = $checkout->account_lines->next; - is( $a->id, $accountline->id, "Koha::Checkout::accountlines returns the related acountline" ); + is( $a->id, $accountline->id, "Koha::Checkout::account_lines returns the related acountline" ); # Enable renewing upon fine payment t::lib::Mocks::mock_preference( 'RenewAccruingItemWhenPaid', 1 ); diff --git a/t/db_dependent/Koha/Checkouts.t b/t/db_dependent/Koha/Checkouts.t index 232a576d1a..4373904142 100755 --- a/t/db_dependent/Koha/Checkouts.t +++ b/t/db_dependent/Koha/Checkouts.t @@ -128,18 +128,18 @@ subtest 'account_lines' => sub { } )->store(); - my $accountlines = $retrieved_checkout_1->account_lines; - is( ref($accountlines), 'Koha::Account::Lines', - 'Koha::Checkout->accountlines should return a Koha::Item' ); + my $account_lines = $retrieved_checkout_1->account_lines; + is( ref($account_lines), 'Koha::Account::Lines', + 'Koha::Checkout->account_lines should return a Koha::Account::Lines' ); - my $line = $accountlines->next; + my $line = $account_lines->next; is( ref($line), 'Koha::Account::Line', 'next returns a Koha::Account::Line' ); is( $accountline->id, $line->id, - 'Koha::Checkout->accountlines should return the correct accountlines' + 'Koha::Checkout->account_lines should return the correct account_lines' ); }; -- 2.20.1