From dce4638e215622181d272f08145a3f97b735b1c7 Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Mon, 19 Feb 2024 10:29:05 -0800 Subject: [PATCH] add some hair colors to the 15.0 tests --- tests/EmojiVersionTest.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/EmojiVersionTest.php b/tests/EmojiVersionTest.php index 5f65d8a..8dc71e1 100644 --- a/tests/EmojiVersionTest.php +++ b/tests/EmojiVersionTest.php @@ -55,9 +55,16 @@ public function testDetectEmoji15() { $this->assertSame('1FABF', $emoji[0]['hex_str']); $this->assertSame(0, $emoji[0]['byte_offset']); $this->assertSame('🪿', is_single_emoji($string)['emoji']); + + $string = "👨🏻‍🦰👨🏿‍🦰"; + $emojis = detect_emoji($string); + $this->assertCount(2, $emojis); + $this->assertSame('red_haired_man', $emojis[0]['short_name']); + $this->assertSame('red_haired_man', $emojis[1]['short_name']); + $this->assertSame('skin-tone-6', $emojis[1]['skin_tone']); } - public function testEmoji51_1() { + public function testEmoji15_1() { # Spot check a few emoji from Emoji 15.1 # https://emojipedia.org/emoji-15.1/ $string = '🍋‍🟩🏃‍♀️‍➡️🐦‍🔥🙂‍↕️'; @@ -68,6 +75,8 @@ public function testEmoji51_1() { $this->assertSame('woman_running_facing_right', $emojis[1]['short_name']); $this->assertSame('phoenix', $emojis[2]['short_name']); $this->assertSame('head_shaking_vertically', $emojis[3]['short_name']); + + $this->assertSame('🍋‍🟩', is_single_emoji("🍋‍🟩")['emoji']); } }