From b36b56b7a1b6edff38322ae97fb14165926502fe Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Tue, 11 Sep 2012 01:00:40 +0200 Subject: [PATCH] Add PHPUnit test to validate calcul_price function for spain. --- test/phpunit/PricesTest.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/phpunit/PricesTest.php b/test/phpunit/PricesTest.php index 7416fa9937a..11c330d2ebe 100755 --- a/test/phpunit/PricesTest.php +++ b/test/phpunit/PricesTest.php @@ -150,6 +150,15 @@ class PricesTest extends PHPUnit_Framework_TestCase print __METHOD__." value8=1.36 result8=".$result1[8]."\n"; $this->assertEquals(1.36,$result1[8]); + $result2=calcul_price_total(10, 10, 0, 10, 1.4, 0, 0, 'HT', 0); // 10 * 10 HT - 0% discount with 10% vat and 1.4% localtax1, 0% localtax2 + + print __METHOD__." value0=100 result0=".$result2[0]."\n"; + $this->assertEquals(100,$result2[0]); + print __METHOD__." value1=10 result1=".$result2[1]."\n"; + $this->assertEquals(10,$result2[1]); + print __METHOD__." value2=111.4 result2=".$result2[2]."\n"; + $this->assertEquals(111.4,$result2[2]); + return true; } -- GitLab