5use PHPUnit\Framework\TestCase;
13 $this->assertEquals(
false, $string);
21 $this->assertEquals(
true, $string);
29 $this->assertEquals(
false, $string);
37 $this->assertEquals(utf8_encode(chr(0xbf)), $string);
45 $this->assertEquals(
'I 💚 SabreDAV', $string);
53 $this->assertEquals(
'', $string);
An exception for terminatinating execution or to throw for unit testing.
testConvertToUTF8nonUTF8()
testConvertToUTF8IsUTF8()
testConvertToUTF8ControlChar()
static convertToUTF8($str)
This method tries its best to convert the input string to UTF-8.
static isUTF8($str)
Returns true or false depending on if a string is valid UTF-8.