mirror of
https://github.com/friendica/friendica
synced 2025-05-01 09:04:24 +02:00
Fixes:
- Strings::isHex() should not be misused for checking on NULL
This commit is contained in:
parent
6743de63f5
commit
e5cc7a5ab1
2 changed files with 6 additions and 10 deletions
|
@ -113,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
|
||||
* @param bool $valid
|
||||
*
|
||||
* @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));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue