forked from Wavyzz/dolibarr
FIX #15572
This commit is contained in:
@@ -1234,7 +1234,9 @@ class FunctionsLibTest extends PHPUnit\Framework\TestCase
|
||||
$newlangs->load("main");
|
||||
$langs = $newlangs;
|
||||
|
||||
$this->assertEquals(1000, price2num('1 000.0'));
|
||||
$this->assertEquals(150, price2num('(SELECT/**/CASE/**/WHEN/**/(0<1)/**/THEN/**/SLEEP(5)/**/ELSE/**/SLEEP(0)/**/END)'));
|
||||
|
||||
$this->assertEquals(1000, price2num('1 000.0'));
|
||||
$this->assertEquals(1000, price2num('1 000', 'MT'));
|
||||
$this->assertEquals(1000, price2num('1 000', 'MU'));
|
||||
|
||||
@@ -1252,7 +1254,7 @@ class FunctionsLibTest extends PHPUnit\Framework\TestCase
|
||||
|
||||
// Text can't be converted
|
||||
$this->assertEquals('12.4$', price2num('12.4$'));
|
||||
$this->assertEquals('12r.4$', price2num('12r.4$'));
|
||||
$this->assertEquals('12.4$', price2num('12r.4$'));
|
||||
|
||||
// For spanish language
|
||||
$newlangs2 = new Translate('', $conf);
|
||||
|
||||
Reference in New Issue
Block a user