splitted two tests with two assertions each into four tests with one assertion

This commit is contained in:
Bernhard Posselt 2012-10-30 17:30:39 +01:00
parent f591382147
commit aef3c6010b
1 changed files with 8 additions and 4 deletions

View File

@ -30,17 +30,19 @@ class Test_TemplateFunctions extends UnitTestCase {
ob_start(); ob_start();
p($htmlString); p($htmlString);
$result = ob_get_clean(); $result = ob_get_clean();
ob_end_clean();
$this->assertEqual("<script>alert('xss');</script>", $result); $this->assertEqual("<script>alert('xss');</script>", $result);
}
ob_end_clean(); public function testPNormalString(){
$normalString = "This is a good string!"; $normalString = "This is a good string!";
ob_start(); ob_start();
p($normalString); p($normalString);
$result = ob_get_clean(); $result = ob_get_clean();
ob_end_clean();
$this->assertEqual("This is a good string!", $result); $this->assertEqual("This is a good string!", $result);
} }
@ -50,17 +52,19 @@ class Test_TemplateFunctions extends UnitTestCase {
ob_start(); ob_start();
print_unescaped($htmlString); print_unescaped($htmlString);
$result = ob_get_clean(); $result = ob_get_clean();
ob_end_clean();
$this->assertEqual($htmlString, $result); $this->assertEqual($htmlString, $result);
}
ob_end_clean(); public function testPrintUnescapedNormalString(){
$normalString = "This is a good string!"; $normalString = "This is a good string!";
ob_start(); ob_start();
p($normalString); p($normalString);
$result = ob_get_clean(); $result = ob_get_clean();
ob_end_clean();
$this->assertEqual("This is a good string!", $result); $this->assertEqual("This is a good string!", $result);
} }