From e54cc9ab28c6cfdc96c90db50bd402a8ef4e3854 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 17 Nov 2025 21:40:36 +0100 Subject: [PATCH] Fix phpunit --- test/phpunit/SecurityTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/phpunit/SecurityTest.php b/test/phpunit/SecurityTest.php index 031f235bb7e..282494af132 100644 --- a/test/phpunit/SecurityTest.php +++ b/test/phpunit/SecurityTest.php @@ -765,23 +765,23 @@ class SecurityTest extends CommonClassTest global $mainmenu,$leftmenu; // Used into following strings to eval $leftmenu = 'AAA'; - $result = dol_eval('$conf->currency && preg_match(\'/^(AAA|BBB)/\',$leftmenu)', 1, 1, '1'); + $result = dol_eval('getDolCurrency() && preg_match(\'/^(AAA|BBB)/\',$leftmenu)', 1, 1, '1'); print "result = ".$result."\n"; $this->assertTrue($result); // Same with a value that does not match $leftmenu = 'XXX'; - $result = dol_eval('$conf->currency && preg_match(\'/^(AAA|BBB)/\',$leftmenu)', 1, 1, '1'); + $result = dol_eval('getDolCurrency() && preg_match(\'/^(AAA|BBB)/\',$leftmenu)', 1, 1, '1'); print "result14 = ".$result."\n"; $this->assertFalse($result); $leftmenu = 'AAA'; - $result = dol_eval('$conf->currency && isStringVarMatching(\'leftmenu\', \'(AAA|BBB)\')', 1, 1, '1'); + $result = dol_eval('getDolCurrency() && isStringVarMatching(\'leftmenu\', \'(AAA|BBB)\')', 1, 1, '1'); print "result15 = ".$result."\n"; $this->assertTrue($result); $leftmenu = 'XXX'; - $result = dol_eval('$conf->currency && isStringVarMatching(\'leftmenu\', \'(AAA|BBB)\')', 1, 1, '1'); + $result = dol_eval('getDolCurrency() && isStringVarMatching(\'leftmenu\', \'(AAA|BBB)\')', 1, 1, '1'); print "result16 = ".$result."\n"; $this->assertFalse($result);