Changeset 41702 for trunk/tests/phpunit/tests/formatting/Emoji.php
- Timestamp:
- 10/03/2017 09:56:45 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/formatting/Emoji.php
r41701 r41702 123 123 // Simple emoji 124 124 '🙂', 125 '<img src="' . $this->png_cdn . '1f642.png" alt=" " class="wp-smiley" style="height: 1em; max-height: 1em;" />',125 '<img src="' . $this->png_cdn . '1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" />', 126 126 ), 127 127 array( 128 128 // Skin tone, gender, ZWJ, emoji selector 129 129 '👮🏼♀️', 130 '<img src="' . $this->png_cdn . '1f46e-1f3fc-200d-2640-fe0f.png" alt=" " class="wp-smiley" style="height: 1em; max-height: 1em;" />',130 '<img src="' . $this->png_cdn . '1f46e-1f3fc-200d-2640-fe0f.png" alt="👮🏼♀️" class="wp-smiley" style="height: 1em; max-height: 1em;" />', 131 131 ), 132 132 array( 133 133 // Unicode 10 134 134 '🧚', 135 '<img src="' . $this->png_cdn . '1f9da.png" alt=" " class="wp-smiley" style="height: 1em; max-height: 1em;" />',135 '<img src="' . $this->png_cdn . '1f9da.png" alt="🧚" class="wp-smiley" style="height: 1em; max-height: 1em;" />', 136 136 ), 137 137 ); 138 139 // Older versions of PHP don't html_entity_decode() emoji, so we need to make sure they're testing in the expected form.140 foreach ( $data as $key => $datum ) {141 $emoji = html_entity_decode( wp_encode_emoji( $datum[0] ) );142 $data[ $key ][1] = str_replace( 'alt=""', 'alt="' . $emoji . '"', $datum[1] );143 }144 138 145 139 return $data;
Note: See TracChangeset
for help on using the changeset viewer.