From e0463caa138398d4b03c522c6f6478f399ec8d48 Mon Sep 17 00:00:00 2001 From: Adam Daley Date: Tue, 17 Mar 2026 19:55:02 +0000 Subject: [PATCH] Fixes for 3 code quality findings in `Invoice` (#3346) * Apply suggested fix to tests-legacy/modules/Invoice/ServiceTransactionTest.php from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> * Apply suggested fix to tests-legacy/modules/Invoice/ServiceTransactionTest.php from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> * Apply suggested fix to tests-legacy/modules/Invoice/ServiceTransactionTest.php from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --------- Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- .../modules/Invoice/ServiceTransactionTest.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests-legacy/modules/Invoice/ServiceTransactionTest.php b/tests-legacy/modules/Invoice/ServiceTransactionTest.php index eaa7993a7..61b5fba64 100644 --- a/tests-legacy/modules/Invoice/ServiceTransactionTest.php +++ b/tests-legacy/modules/Invoice/ServiceTransactionTest.php @@ -166,7 +166,7 @@ final class ServiceTransactionTest extends \BBTestCase $this->assertTrue($result); } - public function testCreateInvalidMissinginvoiceId(): void + public function testCreateInvalidMissingInvoiceId(): void { $eventsMock = $this->createMock('\Box_EventManager'); $eventsMock->expects($this->atLeastOnce()) @@ -186,7 +186,7 @@ final class ServiceTransactionTest extends \BBTestCase $this->service->create($data); } - public function testCreateInvalidMissingbbGatewayId(): void + public function testCreateInvalidMissingGatewayId(): void { $eventsMock = $this->createMock('\Box_EventManager'); $eventsMock->expects($this->atLeastOnce()) @@ -510,9 +510,9 @@ final class ServiceTransactionTest extends \BBTestCase $invoiceModel->loadBean(new \DummyBean()); $invoiceModel->currency = $currency; - $clientModdel = new \Model_Client(); - $clientModdel->loadBean(new \DummyBean()); - $clientModdel->currency = $currency; + $clientModel = new \Model_Client(); + $clientModel->loadBean(new \DummyBean()); + $clientModel->currency = $currency; $transactionModel = new \Model_Transaction(); $transactionModel->loadBean(new \DummyBean()); @@ -524,7 +524,7 @@ final class ServiceTransactionTest extends \BBTestCase $dbMock = $this->createMock('\Box_Database'); $dbMock->expects($this->atLeastOnce()) ->method('load') - ->willReturnOnConsecutiveCalls($invoiceModel, $clientModdel); + ->willReturnOnConsecutiveCalls($invoiceModel, $clientModel); $dbMock->expects($this->atLeastOnce()) ->method('dispense') ->willReturn($clientBalanceModel);