Posts, Post Types: Add initial tests for `get_post_type_labels()`.

See #38218.
Fixes #38157.


git-svn-id: https://develop.svn.wordpress.org/trunk@40635 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Pascal Birchler 2017-05-11 19:18:53 +00:00
parent d8ca95415e
commit ec6de050b7
1 changed files with 0 additions and 21 deletions

View File

@ -219,27 +219,6 @@ class Tests_Post_Types extends WP_UnitTestCase {
_unregister_post_type( 'foo' );
}
/**
* @ticket 33543
*/
function test_get_post_type_labels_should_fall_back_on_defaults_when_filtered_labels_do_not_contain_the_keys() {
add_filter( 'post_type_labels_foo', array( $this, 'filter_post_type_labels' ) );
register_post_type( 'foo' );
$this->assertObjectHasAttribute( 'featured_image', get_post_type_object( 'foo' )->labels );
$this->assertObjectHasAttribute( 'set_featured_image', get_post_type_object( 'foo' )->labels );
_unregister_post_type( 'foo' );
remove_filter( 'post_type_labels_foo', array( $this, 'filter_post_type_labels' ) );
}
public function filter_post_type_labels( $labels ) {
unset( $labels->featured_image );
unset( $labels->set_featured_image );
return $labels;
}
/**
* @ticket 30013
*/