]> git.mxchange.org Git - friendica.git/blobdiff - tests/src/Util/StringsTest.php
Merge pull request #10999 from nupplaphil/bug/configcache_set
[friendica.git] / tests / src / Util / StringsTest.php
index 86b55a2fe3328100358485683258fde7c22b8a2c..7bfe9906b47119ce36a226c99bbd33c837215c33 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -90,10 +90,8 @@ class StringsTest extends TestCase
        {
                $invalidstring='<submit type="button" onclick="alert(\'failed!\');" />';
 
-               $validstring = Strings::escapeTags($invalidstring);
                $escapedString = Strings::escapeHtml($invalidstring);
 
-               self::assertEquals('[submit type="button" onclick="alert(\'failed!\');" /]', $validstring);
                self::assertEquals(
                        "&lt;submit type=&quot;button&quot; onclick=&quot;alert('failed!');&quot; /&gt;",
                        $escapedString
@@ -125,12 +123,12 @@ class StringsTest extends TestCase
        /**
         * Tests if the string is a valid hexadecimal value
         *
-        * @param string $input
-        * @param bool $valid
+        * @param string|null $input
+        * @param bool        $valid
         *
         * @dataProvider dataIsHex
         */
-       public function testIsHex($input, $valid)
+       public function testIsHex(string $input = null, bool $valid = false)
        {
                self::assertEquals($valid, Strings::isHex($input));
        }