From 054010f8ecd55d426c2ac1e5cd5a8bb87e2f83cd Mon Sep 17 00:00:00 2001 From: "Laurent Destailleur (aka Eldy)" Date: Thu, 13 Feb 2025 20:34:55 +0100 Subject: [PATCH] Fix test --- test/phpunit/SecurityTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/phpunit/SecurityTest.php b/test/phpunit/SecurityTest.php index c10a1f5af7c..f4b2f3e25a3 100644 --- a/test/phpunit/SecurityTest.php +++ b/test/phpunit/SecurityTest.php @@ -1149,6 +1149,7 @@ class SecurityTest extends PHPUnit\Framework\TestCase $this->assertEquals('358080.38', $result); global $leftmenu; // Used into strings to eval + $conf->global->MAIN_FEATURES_LEVEL = 1; $leftmenu = 'AAA'; $result=dol_eval('$conf->currency && preg_match(\'/^(AAA|BBB)/\',$leftmenu)', 1, 1, '1'); @@ -1171,7 +1172,7 @@ class SecurityTest extends PHPUnit\Framework\TestCase print "result16 = ".$result."\n"; $this->assertFalse($result); - $string = '(isModEnabled("agenda") || isModEnabled("resource")) && getDolGlobalInt("MAIN_FEATURES_LEVEL") >= 0 && preg_match(\'/^(admintools|all|XXX)/\', $leftmenu)'; + $string = '(isModEnabled("user") || isModEnabled("resource")) && getDolGlobalInt("MAIN_FEATURES_LEVEL") >= 0 && preg_match(\'/^(admintools|all|XXX)/\', $leftmenu)'; $result=dol_eval($string, 1, 1, '1'); print "result17 = ".$result."\n"; $this->assertTrue($result);