mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
Fix phpunit
This commit is contained in:
@@ -276,7 +276,7 @@ class SecurityGETPOSTTest extends CommonClassTest
|
||||
|
||||
$result = GETPOST("param7", 'restricthtml');
|
||||
print __METHOD__." result param7 = ".$result."\n";
|
||||
$this->assertEquals('"c:\this is a path~1\aaan &#x;;;;" abcdef', $result);
|
||||
$this->assertEquals('"c:\this is a path~1\aaan ;" abcdef', $result);
|
||||
|
||||
$result = GETPOST("param8e", 'restricthtml');
|
||||
print __METHOD__." result param8e = ".$result."\n";
|
||||
@@ -345,7 +345,7 @@ class SecurityGETPOSTTest extends CommonClassTest
|
||||
$conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY = 1;
|
||||
|
||||
$result = GETPOST("param0", 'restricthtml');
|
||||
$resultexpected = 'A real string with <a href="rrr" title="aa"bb">aaa</a> and " and \' and & inside content';
|
||||
$resultexpected = 'A real string with <a href="rrr" title="aa"bb">aaa</a> and " and \' and & inside content';
|
||||
print __METHOD__." result for param0=".$result."\n";
|
||||
$this->assertEquals($resultexpected, $result, 'Test on param0');
|
||||
|
||||
@@ -357,12 +357,12 @@ class SecurityGETPOSTTest extends CommonClassTest
|
||||
$result = GETPOST("param6", 'restricthtml');
|
||||
print __METHOD__." result for param6=".$result." - before=".$_POST["param6"]."\n";
|
||||
//$this->assertEquals('InvalidHTMLStringCantBeCleaned', $result, 'Test 15b'); // With some PHP and libxml version, we got this result when parsing invalid HTML, but ...
|
||||
$this->assertEquals('">', $result);
|
||||
$this->assertEquals('">', $result);
|
||||
|
||||
$result = GETPOST("param7", 'restricthtml');
|
||||
print __METHOD__." result param7 = ".$result."\n";
|
||||
//$this->assertEquals('InvalidHTMLStringCantBeCleaned', $result, 'Test 15b'); // With some PHP and libxml version, we got this result when parsing invalid HTML, but ...
|
||||
$this->assertEquals('"c:\this is a path~1\aaan &#x110;" abcdef', $result);
|
||||
$this->assertEquals('"c:\this is a path~1\aaan ;" abcdef', $result);
|
||||
}
|
||||
|
||||
|
||||
@@ -373,7 +373,7 @@ class SecurityGETPOSTTest extends CommonClassTest
|
||||
$conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY = 1;
|
||||
|
||||
$result = GETPOST("param0", 'restricthtml');
|
||||
$resultexpected = 'A real string with <a href="rrr" title=\'aa"bb\'>aaa</a> and " and \' and & inside content';
|
||||
$resultexpected = 'A real string with <a href="rrr" title=\'aa"bb\'>aaa</a> and " and \' and & inside content';
|
||||
print __METHOD__." result for param0=".$result."\n";
|
||||
$this->assertEquals($resultexpected, $result, 'Test on param0');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user