X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=tests%2Fsrc%2FUtil%2FStringsTest.php;h=ae17920e0408be9452240fc6de01bea85c4e59c2;hb=ced77ccbce8e6310b47500769fe5736c59e88f72;hp=7160cb28cc28c6ebc89f8e318219f3d5ce65735e;hpb=122ad0af14f046c2462a03fe33967dc41abfc8b5;p=friendica.git diff --git a/tests/src/Util/StringsTest.php b/tests/src/Util/StringsTest.php index 7160cb28cc..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|null $input - * @param bool $valid + * @param string $input Input string + * @param bool $valid Whether testing on valid or invalid * * @dataProvider dataIsHex */ - public function testIsHex(string $input = null, bool $valid = false) + public function testIsHex(string $input, bool $valid = false) { self::assertEquals($valid, Strings::isHex($input)); }