public function Twig_Test_EscapingTest::testUnicodeCodepointConversionToUtf8

Only testing the first few 2 ranges on this prot. function as that's all these other range tests require

File

drupal/core/vendor/twig/twig/test/Twig/Tests/escapingTest.php, line 216

Class

Twig_Test_EscapingTest
This class is adapted from code coming from Zend Framework.

Code

public function testUnicodeCodepointConversionToUtf8() {
  $expected = " ~ޙ";
  $codepoints = array(
    0x20,
    0x7e,
    0x799,
  );
  $result = '';
  foreach ($codepoints as $value) {
    $result .= $this
      ->codepointToUtf8($value);
  }
  $this
    ->assertEquals($expected, $result);
}