From 2438bf92842ca41f6eeb0d99fda51705316e114d Mon Sep 17 00:00:00 2001 From: David Bomba Date: Fri, 15 Aug 2025 10:44:19 +1000 Subject: [PATCH] Fixes for tests --- .../Export/ReportCsvGenerationTest.php | 32 +++++++++++++++++-- tests/Unit/LateFeeTest.php | 12 +++---- 2 files changed, 36 insertions(+), 8 deletions(-) diff --git a/tests/Feature/Export/ReportCsvGenerationTest.php b/tests/Feature/Export/ReportCsvGenerationTest.php index 2d659819a7..be3202c8a0 100644 --- a/tests/Feature/Export/ReportCsvGenerationTest.php +++ b/tests/Feature/Export/ReportCsvGenerationTest.php @@ -920,11 +920,25 @@ $this->account->forceDelete(); 'balance' => 100, 'number' => '12345', 'status_id' => 2, - 'discount' => 10, + 'discount' => 0, 'po_number' => '1234', 'public_notes' => 'Public', 'private_notes' => 'Private', 'terms' => 'Terms', + 'tax_rate1' => 0, + 'tax_rate2' => 0, + 'tax_rate3' => 0, + 'line_items' => [ + [ + 'quantity' => 1, + 'product_key' => 'product_key', + 'notes' => 'notes', + 'cost' => 100, + 'custom_value1' => 'Custom 1', + 'custom_value2' => 'Custom 2', + 'custom_value3' => 'Custom 3', + ] + ] ]); $invoice->client->balance = 100; @@ -1284,6 +1298,20 @@ $this->account->forceDelete(); 'public_notes' => 'Public', 'private_notes' => 'Private', 'terms' => 'Terms', + 'tax_rate1' => 0, + 'tax_rate2' => 0, + 'tax_rate3' => 0, + 'line_items' => [ + [ + 'quantity' => 1, + 'product_key' => 'product_key', + 'notes' => 'notes', + 'cost' => 100, + 'custom_value1' => 'Custom 1', + 'custom_value2' => 'Custom 2', + 'custom_value3' => 'Custom 3', + ] + ] ]); $repo = new InvoiceRepository(); @@ -1455,7 +1483,7 @@ $this->account->forceDelete(); 'balance' => 50, 'number' => '1234', 'status_id' => 2, - 'discount' => 10, + 'discount' => 0, 'po_number' => '1234', 'public_notes' => 'Public', 'private_notes' => 'Private', diff --git a/tests/Unit/LateFeeTest.php b/tests/Unit/LateFeeTest.php index 534f7d7bd9..7ae014bbd0 100644 --- a/tests/Unit/LateFeeTest.php +++ b/tests/Unit/LateFeeTest.php @@ -53,7 +53,7 @@ class LateFeeTest extends TestCase $this->makeTestData(); - $this->withoutExceptionHandling(); + // $this->withoutExceptionHandling(); } @@ -370,12 +370,12 @@ class LateFeeTest extends TestCase $this->assertEquals(2, count($i->line_items)); - try{ + // try{ $i->service()->autoBill(); - } - catch(\Exception $e){ - nlog($e->getMessage()); - } + // } + // catch(\Exception $e){ + // nlog($e->getMessage()); + // } $i = $i->fresh();