Make WordPress Core

Changeset 47548


Ignore:
Timestamp:
04/04/2020 12:25:36 AM (5 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/theme/support.php

    r47122 r47548  
    6868
    6969        add_theme_support( 'post-thumbnails' );
    70         $this->assertTrue( current_theme_supports( 'post-thumbnails', 'book' ) );
     70        $this->assertTrue( current_theme_supports( 'post-thumbnails', 'any-type' ) );
    7171
    7272        // Reset post-thumbnails theme support.
    73         remove_theme_support( 'post-thumbnails' );
    74         $this->assertFalse( current_theme_supports( 'post-thumbnails' ) );
    75     }
    76 
    77     public function test_post_thumbnails_types_true() {
    78         // array of arguments, with the key of 'types' holding the post types.
    79         add_theme_support( 'post-thumbnails', array( 'types' => true ) );
    80         $this->assertTrue( current_theme_supports( 'post-thumbnails' ) );
    81         $this->assertTrue( current_theme_supports( 'post-thumbnails', rand_str() ) ); // Any type.
    8273        remove_theme_support( 'post-thumbnails' );
    8374        $this->assertFalse( current_theme_supports( 'post-thumbnails' ) );
Note: See TracChangeset for help on using the changeset viewer.