Tests: Remove test_post_thumbnails_types_true().

The test incorrectly describes the behavior of `current_theme_supports( 'post-thumbnails' )` and only passes by accident.

Follow-up to [30148].

Fixes #49801.

git-svn-id: https://develop.svn.wordpress.org/trunk@47548 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2020-04-04 00:25:36 +00:00
parent b5117e1ad5
commit d8f5ce0ae5

View File

@ -67,22 +67,13 @@ class Tests_Theme_Support extends WP_UnitTestCase {
);
add_theme_support( 'post-thumbnails' );
$this->assertTrue( current_theme_supports( 'post-thumbnails', 'book' ) );
$this->assertTrue( current_theme_supports( 'post-thumbnails', 'any-type' ) );
// Reset post-thumbnails theme support.
remove_theme_support( 'post-thumbnails' );
$this->assertFalse( current_theme_supports( 'post-thumbnails' ) );
}
public function test_post_thumbnails_types_true() {
// array of arguments, with the key of 'types' holding the post types.
add_theme_support( 'post-thumbnails', array( 'types' => true ) );
$this->assertTrue( current_theme_supports( 'post-thumbnails' ) );
$this->assertTrue( current_theme_supports( 'post-thumbnails', rand_str() ) ); // Any type.
remove_theme_support( 'post-thumbnails' );
$this->assertFalse( current_theme_supports( 'post-thumbnails' ) );
}
/**
* @ticket 24932
*/