diff --git a/tests/phpunit/tests/term/getTermBy.php b/tests/phpunit/tests/term/getTermBy.php index f5a2162d50..29a6bdc1aa 100644 --- a/tests/phpunit/tests/term/getTermBy.php +++ b/tests/phpunit/tests/term/getTermBy.php @@ -20,4 +20,20 @@ class Tests_Term_GetTermBy extends WP_UnitTestCase { $term = get_term_by( 'id', 123456, 'category' ); $this->assertFalse( $term ); } + + /** + * @ticket 16282 + */ + public function test_get_term_by_slug_should_match_nonaccented_equivalents() { + register_taxonomy( 'wptests_tax', 'post' ); + + $slug = 'ńaș'; + $t = $this->factory->term->create( array( + 'slug' => $slug, + 'taxonomy' => 'wptests_tax', + ) ); + + $found = get_term_by( 'slug', 'nas', 'wptests_tax' ); + $this->assertSame( $t, $found->term_id ); + } }