From 9de730aeab36f9bedde9ea61e48bf2de6c8901c8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 9 Jan 2025 19:28:08 +0100 Subject: [PATCH] Add more 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 a392f28d1cf..7d786f98dba 100644 --- a/test/phpunit/SecurityTest.php +++ b/test/phpunit/SecurityTest.php @@ -1010,12 +1010,12 @@ class SecurityTest extends CommonClassTest $result = dol_htmlwithnojs('', 1, 'restricthtml'); print __METHOD__." result=".$result."\n"; - $this->assertEquals('', $result, 'Test example'); + $this->assertEquals('', $result, 'Test js sanitizing without tidy on'); $result = dol_htmlwithnojs('<script>alert("hello")</script>', 1, 'restricthtml'); //$result = dol_string_onlythesehtmltags($aa, 0, 1, 1); print __METHOD__." result=".$result."\n"; - $this->assertEquals('alert("hello")', $result, 'Test js sanitizing'); + $this->assertEquals('alert("hello")', $result, 'Test js sanitizing without tidy'); $conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML = $sav1; $conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY = $sav2; @@ -1029,12 +1029,12 @@ class SecurityTest extends CommonClassTest $result = dol_htmlwithnojs('', 1, 'restricthtml'); //$result = dol_string_onlythesehtmltags($aa, 0, 1, 1); print __METHOD__." result=".$result."\n"; - $this->assertEquals('', $result, 'Test example'); + $this->assertEquals('', $result, 'Test js sanitizing with tidy on'); $result = dol_htmlwithnojs('<script>alert("hello")</script>', 1, 'restricthtml'); //$result = dol_string_onlythesehtmltags($aa, 0, 1, 1); print __METHOD__." result=".$result."\n"; - $this->assertEquals('<script>alert("hello")</script>', $result, 'Test js sanitizing'); + $this->assertEquals('<script>alert("hello")</script>', $result, 'Test js sanitizing with tidy on'); $conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML = $sav1; $conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY = $sav2;