From 179426a536bf8f61706f25891a16e3ed95d314e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Miguel=20Moreno?= Date: Mon, 26 Sep 2022 21:00:11 +0200 Subject: [PATCH] =?UTF-8?q?Arreglado=20test=20de=20precisi=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Actualizada clase PrecisionTest --- tests/PrecisionTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/PrecisionTest.php b/tests/PrecisionTest.php index 8016bf1..344c480 100644 --- a/tests/PrecisionTest.php +++ b/tests/PrecisionTest.php @@ -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) { @@ -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'); }