From d8f5ce0ae5834b2eb48ed02aab898fee3a609652 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 4 Apr 2020 00:25:36 +0000 Subject: [PATCH] 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 --- tests/phpunit/tests/theme/support.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/tests/phpunit/tests/theme/support.php b/tests/phpunit/tests/theme/support.php index ac33ce1445..79b2be4a1e 100644 --- a/tests/phpunit/tests/theme/support.php +++ b/tests/phpunit/tests/theme/support.php @@ -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 */