class UTF8UtilsTest in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/masterminds/html5/test/HTML5/Parser/UTF8UtilsTest.php \Masterminds\HTML5\Tests\Parser\UTF8UtilsTest
Hierarchy
- class \Masterminds\HTML5\Tests\TestCase extends \Masterminds\HTML5\Tests\PHPUnit_Framework_TestCase- class \Masterminds\HTML5\Tests\Parser\UTF8UtilsTest
 
Expanded class hierarchy of UTF8UtilsTest
File
- vendor/masterminds/ html5/ test/ HTML5/ Parser/ UTF8UtilsTest.php, line 7 
Namespace
Masterminds\HTML5\Tests\ParserView source
class UTF8UtilsTest extends \Masterminds\HTML5\Tests\TestCase {
  public function testConvertToUTF8() {
    $out = UTF8Utils::convertToUTF8('éàa', 'ISO-8859-1');
    $this
      ->assertEquals('éàa', $out);
  }
  /**
   * @todo add tests for invalid codepoints
   */
  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);
  }
}Members
| Name   | Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| TestCase:: | constant | |||
| TestCase:: | constant | |||
| TestCase:: | public | function | ||
| TestCase:: | public | function | ||
| TestCase:: | protected | function | ||
| UTF8UtilsTest:: | public | function | * @todo add tests for invalid codepoints | |
| UTF8UtilsTest:: | public | function | 
