Skip to content

Commit

Permalink
add some hair colors to the 15.0 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronpk committed Feb 19, 2024
1 parent e42d0ce commit dce4638
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/EmojiVersionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '🍋‍🟩🏃‍♀️‍➡️🐦‍🔥🙂‍↕️';
Expand All @@ -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']);
}

}

0 comments on commit dce4638

Please sign in to comment.