summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2012-10-30 17:30:39 +0100
committerBernhard Posselt <nukeawhale@gmail.com>2012-10-30 17:30:39 +0100
commitaef3c6010b187a3e2fc018f5854770aef5f5c16a (patch)
tree981385ed75208791be14135be04df2d55180e4bb /tests
parentf59138214735b6e0516b35d62a62a144f9b0a3e1 (diff)
downloadnextcloud-server-aef3c6010b187a3e2fc018f5854770aef5f5c16a.tar.gz
nextcloud-server-aef3c6010b187a3e2fc018f5854770aef5f5c16a.zip
splitted two tests with two assertions each into four tests with one assertion
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/template.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/lib/template.php b/tests/lib/template.php
index 0151ab331d1..3f0855de76c 100644
--- a/tests/lib/template.php
+++ b/tests/lib/template.php
@@ -30,17 +30,19 @@ class Test_TemplateFunctions extends UnitTestCase {
ob_start();
p($htmlString);
$result = ob_get_clean();
+ ob_end_clean();
$this->assertEqual("&lt;script&gt;alert(&#039;xss&#039;);&lt;/script&gt;", $result);
+ }
- ob_end_clean();
+ public function testPNormalString(){
$normalString = "This is a good string!";
ob_start();
p($normalString);
$result = ob_get_clean();
+ ob_end_clean();
$this->assertEqual("This is a good string!", $result);
-
}
@@ -50,17 +52,19 @@ class Test_TemplateFunctions extends UnitTestCase {
ob_start();
print_unescaped($htmlString);
$result = ob_get_clean();
+ ob_end_clean();
$this->assertEqual($htmlString, $result);
+ }
- ob_end_clean();
+ public function testPrintUnescapedNormalString(){
$normalString = "This is a good string!";
ob_start();
p($normalString);
$result = ob_get_clean();
+ ob_end_clean();
$this->assertEqual("This is a good string!", $result);
-
}