Skip to content

Commit

Permalink
Avoid 0 for fake line number.
Browse files Browse the repository at this point in the history
  • Loading branch information
firebed committed Jun 14, 2024
1 parent 8e3d730 commit 1a13f2d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Factories/InvoiceDetailsFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class InvoiceDetailsFactory extends Factory
public function definition(): array
{
return [
'lineNumber' => fake()->unique()->randomNumber(),
'lineNumber' => fake()->randomDigitNotZero(),
'recType' => fake()->randomElement(RecType::cases()),
'TaricNo' => fake()->bothify('???###??##'),
'itemCode' => fake()->bothify('??##??'),
Expand Down
2 changes: 1 addition & 1 deletion tests/InvoiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function test_invoice_validation_fail()
$invoice = Invoice::factory()->make();
$invoice->getInvoiceHeader()->setInvoiceType("wrong");
$invoice->getInvoiceSummary()->setTotalGrossValue(-10);

// "wrong" value will be cast to null because InvoiceType enum does
// not have "wrong" value.
// Since null values are stripped from the array, we expect a failure
Expand Down

0 comments on commit 1a13f2d

Please sign in to comment.