Index: /trunk/tests/phpunit/tests/taxonomy.php =================================================================== --- /trunk/tests/phpunit/tests/taxonomy.php (revision 53367) +++ /trunk/tests/phpunit/tests/taxonomy.php (revision 53368) @@ -240,4 +240,56 @@ /** + * @ticket 49701 + * + * @covers ::get_inline_data + */ + public function test_get_inline_data_contains_term_if_show_ui_false_but_show_on_quick_edit_true_for_hierarchical_taxonomy() { + // Create a post with a term from a hierarchical taxonomy. + register_taxonomy( + 'wptests_tax_1', + 'post', + array( + 'show_ui' => false, + 'show_in_quick_edit' => true, + 'hierarchical' => true, + ) + ); + $term = wp_insert_term( 'Test', 'wptests_tax_1' ); + $post = self::factory()->post->create_and_get(); + wp_set_object_terms( $post->ID, $term['term_id'], 'wptests_tax_1' ); + + // Test get_inline_data() has post_category div containing assigned term. + wp_set_current_user( self::factory()->user->create( array( 'role' => 'editor' ) ) ); + get_inline_data( $post ); + $this->expectOutputRegex( '/