X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=tests%2Fsrc%2FUtil%2FStringsTest.php;h=ae17920e0408be9452240fc6de01bea85c4e59c2;hb=ced77ccbce8e6310b47500769fe5736c59e88f72;hp=86b55a2fe3328100358485683258fde7c22b8a2c;hpb=efaec26b1d8aa9af88994eaddafc7fcec4ae9ce1;p=friendica.git diff --git a/tests/src/Util/StringsTest.php b/tests/src/Util/StringsTest.php index 86b55a2fe3..ae17920e04 100644 --- a/tests/src/Util/StringsTest.php +++ b/tests/src/Util/StringsTest.php @@ -1,6 +1,6 @@ '; - $validstring = Strings::escapeTags($invalidstring); $escapedString = Strings::escapeHtml($invalidstring); - self::assertEquals('[submit type="button" onclick="alert(\'failed!\');" /]', $validstring); self::assertEquals( "<submit type="button" onclick="alert('failed!');" />", $escapedString @@ -115,22 +113,18 @@ class StringsTest extends TestCase 'input' => '', 'valid' => false, ], - 'nullHex' => [ - 'input' => null, - 'valid' => false, - ], ]; } /** * Tests if the string is a valid hexadecimal value * - * @param string $input - * @param bool $valid + * @param string $input Input string + * @param bool $valid Whether testing on valid or invalid * * @dataProvider dataIsHex */ - public function testIsHex($input, $valid) + public function testIsHex(string $input, bool $valid = false) { self::assertEquals($valid, Strings::isHex($input)); }