diff options
author | Andreas Fischer <bantu@owncloud.com> | 2014-04-24 15:36:02 +0200 |
---|---|---|
committer | Andreas Fischer <bantu@owncloud.com> | 2014-04-24 15:36:02 +0200 |
commit | 88778b569e73dd2319c547be53df6aab6b8fa667 (patch) | |
tree | 78782fe023fabf8c97e5b2638aecc8a3316ca039 /tests/lib/template.php | |
parent | 0d3ddd9e11eeafbc51d95e20226117bc3424bcaf (diff) | |
download | nextcloud-server-88778b569e73dd2319c547be53df6aab6b8fa667.tar.gz nextcloud-server-88778b569e73dd2319c547be53df6aab6b8fa667.zip |
Split testP() tests into multiple methods.
Diffstat (limited to 'tests/lib/template.php')
-rw-r--r-- | tests/lib/template.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/lib/template.php b/tests/lib/template.php index 40aec402347..299eb2b9369 100644 --- a/tests/lib/template.php +++ b/tests/lib/template.php @@ -27,13 +27,15 @@ class Test_TemplateFunctions extends PHPUnit_Framework_TestCase { $loader->load('OC_Template'); } - public function testP() { + public function testPJavaScript() { $badString = '<img onload="alert(1)" />'; ob_start(); p($badString); $result = ob_get_clean(); $this->assertEquals('<img onload="alert(1)" />', $result); + } + public function testPJavaScriptWithScriptTags() { $badString = "<script>alert('Hacked!');</script>"; ob_start(); p($badString); |