mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-12-04 22:24:42 +09:00
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>
This commit is contained in:
1 parent
e8da57d4da
commit
e0463caa13
1 file changed
+6
-6
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user