php unit test keep receiving error: Invoice: unable to set tax twice
MattWiseParking opened this issue · comments
MattWiseParking commented
Hi
Im not too sure why but my php unit tests keep erroring with exception: Invoice: unable to set tax twice
If i run the code manually without phpunit it works fine, not too sure why I would be receiving this error in unit tests.
I can see that the Exception is set in vendor/laraveldaily/laravel-invoices/src/Traits line 58 where it checks if $this->hasTax()
Would be great if you could help
Thanks :)
MattWiseParking commented
issue was because in the factory i was declairing fields to create the tax multiple ways when in stead you should only use one field.