forked from Wavyzz/dolibarr
Fix with php-cs-fixer
This commit is contained in:
@@ -118,15 +118,18 @@ class FunctionsLibTest extends PHPUnit\Framework\TestCase
|
||||
//$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
||||
|
||||
if (! function_exists('mb_substr')) {
|
||||
print "\n".__METHOD__." function mb_substr must be enabled.\n"; die(1);
|
||||
print "\n".__METHOD__." function mb_substr must be enabled.\n";
|
||||
die(1);
|
||||
}
|
||||
|
||||
if ($conf->global->MAIN_MAX_DECIMALS_UNIT != 5) {
|
||||
print "\n".__METHOD__." bad setup for number of digits for unit amount. Must be 5 for this test.\n"; die(1);
|
||||
print "\n".__METHOD__." bad setup for number of digits for unit amount. Must be 5 for this test.\n";
|
||||
die(1);
|
||||
}
|
||||
|
||||
if ($conf->global->MAIN_MAX_DECIMALS_TOT != 2) {
|
||||
print "\n".__METHOD__." bad setup for number of digits for unit amount. Must be 2 for this test.\n"; die(1);
|
||||
print "\n".__METHOD__." bad setup for number of digits for unit amount. Must be 2 for this test.\n";
|
||||
die(1);
|
||||
}
|
||||
|
||||
print __METHOD__."\n";
|
||||
@@ -661,15 +664,18 @@ class FunctionsLibTest extends PHPUnit\Framework\TestCase
|
||||
*/
|
||||
public function testDolConcat()
|
||||
{
|
||||
$text1="A string 1"; $text2="A string 2"; // text 1 and 2 are text, concat need only \n
|
||||
$text1="A string 1";
|
||||
$text2="A string 2"; // text 1 and 2 are text, concat need only \n
|
||||
$after=dol_concatdesc($text1, $text2);
|
||||
$this->assertEquals("A string 1\nA string 2", $after);
|
||||
|
||||
$text1="A<br>string 1"; $text2="A string 2"; // text 1 is html, concat need <br>\n
|
||||
$text1="A<br>string 1";
|
||||
$text2="A string 2"; // text 1 is html, concat need <br>\n
|
||||
$after=dol_concatdesc($text1, $text2);
|
||||
$this->assertEquals("A<br>string 1<br>\nA string 2", $after);
|
||||
|
||||
$text1="A string 1"; $text2="A <b>string</b> 2"; // text 2 is html, concat need <br>\n
|
||||
$text1="A string 1";
|
||||
$text2="A <b>string</b> 2"; // text 2 is html, concat need <br>\n
|
||||
$after=dol_concatdesc($text1, $text2);
|
||||
$this->assertEquals("A string 1<br>\nA <b>string</b> 2", $after);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user