Make WordPress Core

Ticket #35293: 35293.patch

File 35293.patch, 1.3 KB (added by ocean90, 8 years ago)
  • tests/phpunit/tests/formatting/Emoji.php

     
    6565                remove_filter( 'emoji_url', array( $this, '_filtered_emoji_png_cdn' ) );
    6666        }
    6767
     68        /**
     69         * @ticket 35293
     70         */
     71        public function test_wp_staticize_emoji() {
     72                $this->assertContains( 'https://s.w.org/images/core/emoji/2/72x72/1f60e.png', wp_staticize_emoji( '😎' ) ); // Unicode 6: smiling face with sunglasses
     73                $this->assertContains( 'https://s.w.org/images/core/emoji/2/72x72/1f44d-1f3fb.png', wp_staticize_emoji( '👍🏻' ) ); // Unicode 8: thumbs up sign
     74                $this->assertContains( 'https://s.w.org/images/core/emoji/2/72x72/1f923.png', wp_staticize_emoji( '🤣' ) ); // Unicode 9: rolling on the floor laughing
     75        }
     76
     77        /**
     78         * @ticket 352932
     79         */
     80        public function test_wp_encode_emoji() {
     81                $this->assertSame( '😎', wp_encode_emoji( '😎' ) ); // Unicode 6: smiling face with sunglasses
     82                $this->assertSame( '👍🏻', wp_encode_emoji( '👍🏻' ) ); // Unicode 8: thumbs up sign
     83                $this->assertSame( '🤣', wp_encode_emoji( '🤣' ) ); // Unicode 9: rolling on the floor laughing
     84        }
    6885}