/** * Convert matched bytes back to unicode string reference */ public function testAllSequencesResolveUnicode() { foreach ($this->get_all() as $raw => $key) { $codes = twitter_api_utf8_array($raw); $ucode = twitter_api_unicode_implode($codes); $this->assertEquals($key, $ucode); } }
public function testHexCodesCorrectLengthAndCase() { $text = twitter_api_unicode_implode(array(0x97, 0xa9, 0x2122, 0x1f004)); $this->assertSame('0097-00a9-2122-1f004', $text); }