public function UnicodeTest::testValidateUtf8 in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php \Drupal\Tests\Component\Utility\UnicodeTest::testValidateUtf8()
Tests UTF-8 validation.
@dataProvider providerTestValidateUtf8 @covers ::validateUtf8
Parameters
string $text: The text to validate.
bool $expected: The expected return value from Unicode::validateUtf8().
string $message: The message to display on failure.
File
- core/
tests/ Drupal/ Tests/ Component/ Utility/ UnicodeTest.php, line 324
Class
- UnicodeTest
- Test unicode handling features implemented in Unicode component.
Namespace
Drupal\Tests\Component\UtilityCode
public function testValidateUtf8($text, $expected, $message) {
$this
->assertEquals($expected, Unicode::validateUtf8($text), $message);
}