diff options
author | Maurício Meneghini Fauth <mauricio@fauth.dev> | 2019-06-12 21:21:48 +0300 |
---|---|---|
committer | Maurício Meneghini Fauth <mauricio@fauth.dev> | 2019-06-12 21:21:48 +0300 |
commit | 0feae320563279a0d6319dc59f9826f2348efb68 (patch) | |
tree | c49e1a3c60179597d1e9aedf85c13a1478424a70 /test/classes/SanitizeTest.php | |
parent | 0bb9955aadbb58624399f2f1164809509a3a5564 (diff) |
Rename Sanitize::sanitize to Sanitize::sanitizeMessage
...to avoid the PHP 4 constructor format
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Diffstat (limited to 'test/classes/SanitizeTest.php')
-rw-r--r-- | test/classes/SanitizeTest.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/classes/SanitizeTest.php b/test/classes/SanitizeTest.php index 9036c403f1..9b889f731c 100644 --- a/test/classes/SanitizeTest.php +++ b/test/classes/SanitizeTest.php @@ -28,7 +28,7 @@ class SanitizeTest extends TestCase { $this->assertEquals( '[a@javascript:alert(\'XSS\');@target]link</a>', - Sanitize::sanitize('[a@javascript:alert(\'XSS\');@target]link[/a]') + Sanitize::sanitizeMessage('[a@javascript:alert(\'XSS\');@target]link[/a]') ); } @@ -45,7 +45,7 @@ class SanitizeTest extends TestCase unset($GLOBALS['lang']); $this->assertEquals( '<a href="./url.php?url=https%3A%2F%2Fwww.phpmyadmin.net%2F" target="target">link</a>', - Sanitize::sanitize('[a@https://www.phpmyadmin.net/@target]link[/a]') + Sanitize::sanitizeMessage('[a@https://www.phpmyadmin.net/@target]link[/a]') ); $GLOBALS['lang'] = $lang; @@ -65,7 +65,7 @@ class SanitizeTest extends TestCase { $this->assertEquals( '<a href="./url.php?url=https%3A%2F%2Fdocs.phpmyadmin.net%2Fen%2Flatest%2F' . $expected . '" target="documentation">doclink</a>', - Sanitize::sanitize('[doc@' . $link . ']doclink[/doc]') + Sanitize::sanitizeMessage('[doc@' . $link . ']doclink[/doc]') ); } @@ -105,7 +105,7 @@ class SanitizeTest extends TestCase { $this->assertEquals( '[a@./Documentation.html@INVALID9]doc</a>', - Sanitize::sanitize('[a@./Documentation.html@INVALID9]doc[/a]') + Sanitize::sanitizeMessage('[a@./Documentation.html@INVALID9]doc[/a]') ); } @@ -118,7 +118,7 @@ class SanitizeTest extends TestCase { $this->assertEquals( '[a@./Documentation.html" onmouseover="alert(foo)"]doc</a>', - Sanitize::sanitize('[a@./Documentation.html" onmouseover="alert(foo)"]doc[/a]') + Sanitize::sanitizeMessage('[a@./Documentation.html" onmouseover="alert(foo)"]doc[/a]') ); } @@ -131,7 +131,7 @@ class SanitizeTest extends TestCase { $this->assertEquals( '<a href="./url.php?url=https%3A%2F%2Fdocs.phpmyadmin.net%2F">doc</a>[a@javascript:alert(\'XSS\');@target]link</a>', - Sanitize::sanitize('[a@https://docs.phpmyadmin.net/]doc[/a][a@javascript:alert(\'XSS\');@target]link[/a]') + Sanitize::sanitizeMessage('[a@https://docs.phpmyadmin.net/]doc[/a][a@javascript:alert(\'XSS\');@target]link[/a]') ); } @@ -144,7 +144,7 @@ class SanitizeTest extends TestCase { $this->assertEquals( '<div onclick="">', - Sanitize::sanitize('<div onclick="">') + Sanitize::sanitizeMessage('<div onclick="">') ); } @@ -157,7 +157,7 @@ class SanitizeTest extends TestCase { $this->assertEquals( '<strong>strong</strong>', - Sanitize::sanitize('[strong]strong[/strong]') + Sanitize::sanitizeMessage('[strong]strong[/strong]') ); } @@ -170,7 +170,7 @@ class SanitizeTest extends TestCase { $this->assertEquals( '<strong>strong</strong>', - Sanitize::sanitize('[strong]strong[/strong]', true) + Sanitize::sanitizeMessage('[strong]strong[/strong]', true) ); } |