Some tests uses url\encode() function on the expected results. This defeats the purpose of the tests since the behavior of url\encode() itself will not be tested. We should assume that every function may fail. The expected string should be placed as string instead.
Some tests uses
url\encode()
function on the expected results. This defeats the purpose of the tests since the behavior ofurl\encode()
itself will not be tested. We should assume that every function may fail. The expected string should be placed as string instead.Example:
"expectedResult" => 'http://example.com/'.url\encode('"><script>alert("xss")</script>')
Should be:
"expectedResult" => 'http://example.com/%22%3E%3Cscript%3Ealert(%22xss%22)%3C/script%3E'