summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-12-08 11:04:25 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-12-08 11:04:25 +0100
commitfe8dc0bd5e867831a70251fb8604e1a397f2901b (patch)
treece924a7349275ca64f124a83ca42a7112b75b18a /tests
parentc88438790cbaa3510c8dc8a251e241164da6c93f (diff)
parent6d3eb7673d1671a9e1f8437388f344a90e3d71dd (diff)
downloadnextcloud-server-fe8dc0bd5e867831a70251fb8604e1a397f2901b.tar.gz
nextcloud-server-fe8dc0bd5e867831a70251fb8604e1a397f2901b.zip
Merge pull request #21022 from owncloud/get-rid-of-by-reference
Get rid of by reference
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/util.php18
1 files changed, 12 insertions, 6 deletions
diff --git a/tests/lib/util.php b/tests/lib/util.php
index 9b82be36955..fa559c17c80 100644
--- a/tests/lib/util.php
+++ b/tests/lib/util.php
@@ -95,16 +95,22 @@ class Test_Util extends \Test\TestCase {
}
function testSanitizeHTML() {
- $badArray = array(
+ $badArray = [
'While it is unusual to pass an array',
'this function actually <blink>supports</blink> it.',
- 'And therefore there needs to be a <script>alert("Unit"+\'test\')</script> for it!'
- );
- $goodArray = array(
+ 'And therefore there needs to be a <script>alert("Unit"+\'test\')</script> for it!',
+ [
+ 'And It Even May <strong>Nest</strong>',
+ ],
+ ];
+ $goodArray = [
'While it is unusual to pass an array',
'this function actually &lt;blink&gt;supports&lt;/blink&gt; it.',
- 'And therefore there needs to be a &lt;script&gt;alert(&quot;Unit&quot;+&#039;test&#039;)&lt;/script&gt; for it!'
- );
+ 'And therefore there needs to be a &lt;script&gt;alert(&quot;Unit&quot;+&#039;test&#039;)&lt;/script&gt; for it!',
+ [
+ 'And It Even May &lt;strong&gt;Nest&lt;/strong&gt;'
+ ],
+ ];
$result = OC_Util::sanitizeHTML($badArray);
$this->assertEquals($goodArray, $result);