Add phpunit for get_localtax_by_third

This commit is contained in:
Laurent Destailleur
2023-03-18 10:48:09 +01:00
parent 4ef435e286
commit 8d2a3a863d

View File

@@ -1168,7 +1168,7 @@ class FunctionsLibTest extends PHPUnit\Framework\TestCase
}
/**
* testGetDefaultTva
* testGetDefaultLocalTax
*
* @return void
*/
@@ -1255,6 +1255,27 @@ class FunctionsLibTest extends PHPUnit\Framework\TestCase
}
/**
* testGetLocalTaxByThird
*
* @return void
*/
public function testGetLocalTaxByThird()
{
global $mysoc;
$mysoc->country_code = 'ES';
$result = get_localtax_by_third(1);
print __METHOD__." result=".$result."\n";
$this->assertEquals('5.2', $result);
$result = get_localtax_by_third(2);
print __METHOD__." result=".$result."\n";
$this->assertEquals('-19:-15:-9', $result);
}
/**
* testDolExplodeIntoArray
*