mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
Add emoji URL support, and Twemoji fallback for displaying slugs in wp-admin, when the browser doesn't natively support emoji.
Props pento, SergeyBiryukov and boonebgorges. Fixes #31328 git-svn-id: https://develop.svn.wordpress.org/trunk@31734 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -8,7 +8,7 @@ class Tests_Formatting_UrlEncodedToEntities extends WP_UnitTestCase {
|
||||
* @dataProvider data
|
||||
*/
|
||||
function test_convert_urlencoded_to_entities( $u_urlencoded, $entity ) {
|
||||
$this->assertEquals( $entity, preg_replace_callback('/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $u_urlencoded ), $entity );
|
||||
$this->assertEquals( $entity, preg_replace_callback('/\%u([0-9A-F]{4,5})/', '_convert_urlencoded_to_entities', $u_urlencoded ), $entity );
|
||||
}
|
||||
|
||||
function data() {
|
||||
|
||||
@@ -174,8 +174,9 @@ class Tests_Term extends WP_UnitTestCase {
|
||||
|
||||
// Test existing term name with unique slug
|
||||
$term1 = $this->factory->tag->create( array( 'name' => 'Bozo', 'slug' => 'bozo1' ) );
|
||||
$this->assertFalse( is_wp_error( $term1 ) );
|
||||
$this->assertTrue( empty($term1->errors ) );
|
||||
$this->assertTrue( is_wp_error( $term1 ) );
|
||||
$this->assertSame( 'term_exists', $term1->get_error_code() );
|
||||
$this->assertEquals( $term->term_id, $term1->get_error_data() );
|
||||
|
||||
// Test an existing term name
|
||||
$term2 = $this->factory->tag->create( array( 'name' => 'Bozo' ) );
|
||||
|
||||
Reference in New Issue
Block a user