mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-12-02 21:30:16 +09:00
Fixes for 2 code quality findings in Invoice tests (#3359)
* Apply suggested fix to tests-legacy/modules/Invoice/ServiceTest.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/ServiceTest.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
b47ef9d237
commit
786a00f9f1
1 file changed
+6
-2
@@ -157,6 +157,9 @@ final class ServiceTest extends \BBTestCase
|
||||
$subscriptionServiceMock->expects($this->atLeastOnce())
|
||||
->method('isSubscribable')
|
||||
->willReturn(true);
|
||||
|
||||
$invoiceItemServiceMock = $this->createMock(\Box\Mod\Invoice\ServiceInvoiceItem::class);
|
||||
|
||||
$modelToArrayResult = [
|
||||
'id' => 1,
|
||||
'serie' => 'BB',
|
||||
@@ -213,9 +216,10 @@ final class ServiceTest extends \BBTestCase
|
||||
|
||||
$di = $this->getDi();
|
||||
$di['db'] = $dbMock;
|
||||
$di['mod_service'] = $di->protect(function ($serviceName, $sub = '') use ($systemService, $subscriptionServiceMock) {
|
||||
$di['mod_service'] = $di->protect(function ($serviceName, $sub = '') use ($systemService, $subscriptionServiceMock, $invoiceItemServiceMock) {
|
||||
$service = null;
|
||||
if ($sub == 'InvoiceItem') {
|
||||
$service = $invoiceItemServiceMock;
|
||||
}
|
||||
if ($serviceName == 'system') {
|
||||
$service = $systemService;
|
||||
@@ -537,7 +541,7 @@ final class ServiceTest extends \BBTestCase
|
||||
'id' => 1,
|
||||
],
|
||||
],
|
||||
'approve',
|
||||
'approve' => true,
|
||||
];
|
||||
|
||||
$clientModel = new \Model_Client();
|
||||
|
||||
Reference in new issue
Block a user