You are here

public function UTF8UtilsTest::testCheckForIllegalCodepoints in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/masterminds/html5/test/HTML5/Parser/UTF8UtilsTest.php \Masterminds\HTML5\Tests\Parser\UTF8UtilsTest::testCheckForIllegalCodepoints()

* @todo add tests for invalid codepoints

File

vendor/masterminds/html5/test/HTML5/Parser/UTF8UtilsTest.php, line 17

Class

UTF8UtilsTest

Namespace

Masterminds\HTML5\Tests\Parser

Code

public function testCheckForIllegalCodepoints() {
  $smoke = "Smoke test";
  $err = UTF8Utils::checkForIllegalCodepoints($smoke);
  $this
    ->assertEmpty($err);
  $data = "Foo Bar \0 Baz";
  $errors = UTF8Utils::checkForIllegalCodepoints($data);
  $this
    ->assertContains('null-character', $errors);
}