mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-31 22:22:28 +01:00
Add phpunit for get_localtax_by_third
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user