Remove redundant test case for non-HTML string.

This commit is contained in:
Andreas Fischer 2014-04-24 15:34:09 +02:00
parent f9091a8584
commit 0d3ddd9e11
1 changed files with 2 additions and 9 deletions

View File

@ -39,7 +39,9 @@ class Test_TemplateFunctions extends PHPUnit_Framework_TestCase {
p($badString); p($badString);
$result = ob_get_clean(); $result = ob_get_clean();
$this->assertEquals('<script>alert('Hacked!');</script>', $result); $this->assertEquals('<script>alert('Hacked!');</script>', $result);
}
public function testPNormalString() {
$goodString = 'This is a good string without HTML.'; $goodString = 'This is a good string without HTML.';
ob_start(); ob_start();
p($goodString); p($goodString);
@ -47,15 +49,6 @@ class Test_TemplateFunctions extends PHPUnit_Framework_TestCase {
$this->assertEquals('This is a good string without HTML.', $result); $this->assertEquals('This is a good string without HTML.', $result);
} }
public function testPNormalString() {
$normalString = "This is a good string!";
ob_start();
p($normalString);
$result = ob_get_clean();
$this->assertEquals("This is a good string!", $result);
}
public function testPrintUnescaped() { public function testPrintUnescaped() {
$htmlString = "<script>alert('xss');</script>"; $htmlString = "<script>alert('xss');</script>";