Skip to content

Commit

Permalink
Arreglado test de precisión
Browse files Browse the repository at this point in the history
- Actualizada clase PrecisionTest
  • Loading branch information
josemmo committed Sep 26, 2022
1 parent 3955e0a commit 179426a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/PrecisionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ private function _runTest($schema, $precision) {
$taxesWithheld = floatval($invoiceXml->InvoiceTotals->TotalTaxesWithheld);
$invoiceTotal = floatval($invoiceXml->InvoiceTotals->InvoiceTotal);
$actualTotal = floatval($beforeTaxes + $taxOutputs - $taxesWithheld);
$this->assertEquals($actualTotal, $invoiceTotal, 'Incorrect invoice totals element', 0.000000001);
$this->assertEqualsWithDelta($actualTotal, $invoiceTotal, 0.000000001, 'Incorrect invoice totals element');

// Validate total invoice amount
if ($precision === Facturae::PRECISION_INVOICE) {
Expand All @@ -40,7 +40,7 @@ private function _runTest($schema, $precision) {
return round($amount*1.21, 2);
}, $amounts));
}
$this->assertEquals($expectedTotal, $invoiceTotal, 'Incorrect total invoice amount', 0.000000001);
$this->assertEqualsWithDelta($expectedTotal, $invoiceTotal, 0.000000001, 'Incorrect total invoice amount');
}


Expand Down

0 comments on commit 179426a

Please # to comment.