Skip to content
Snippets Groups Projects
Commit 1fafa401 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix test on currency name

parent 32ff0912
No related branches found
No related tags found
No related merge requests found
......@@ -434,6 +434,8 @@ function currency_name($code_iso, $withcode='', $outputlangs=null)
if (empty($outputlangs)) $outputlangs=$langs;
$outputlangs->load("dict");
// If there is a translation, we can send immediatly the label
if ($outputlangs->trans("Currency".$code_iso)!="Currency".$code_iso)
{
......
......@@ -129,11 +129,10 @@ class CompanyLibTest extends PHPUnit_Framework_TestCase
$result=currency_name('USD');
print __METHOD__." result=".$result."\n";
$this->assertEquals('United States Dollar',$result,'Test to get currency name USD in default language '.$langs->defaultlang);
$this->assertEquals('US Dollars',$result,'Test to get currency name USD in default language '.$langs->defaultlang);
$outputlangs=new Translate('', $conf);
$outputlangs->setDefaultLang('fr_FR');
$outputlangs->load("dict");
$result=currency_name('USD', 1, $outputlangs);
print __METHOD__." result=".$result."\n";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment