diff --git a/tests/phpunit/tests/term/getTermToEdit.php b/tests/phpunit/tests/term/getTermToEdit.php new file mode 100644 index 0000000000000..c8a5c9655b75f --- /dev/null +++ b/tests/phpunit/tests/term/getTermToEdit.php @@ -0,0 +1,33 @@ +category->create( + array( + 'name' => 'News', + ) + ); + + add_filter( + 'edit_term_name', + static function ( $value ) { + return $value . '|edit'; + } + ); + + $term = get_term_to_edit( $term_id, 'category' ); + + $this->assertInstanceOf( 'WP_Term', $term ); + $this->assertSame( 'News|edit', $term->name ); + } +}