Make WordPress Core

Changeset 49354


Ignore:
Timestamp:
10/28/2020 03:12:40 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Themes: Move the test for post-formats theme support to a more appropriate place.

Follow-up to [49344].

See #51390.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/theme.php

    r49344 r49354  
    24822482 * @since 5.5.0 The `core-block-patterns` feature was added and is enabled by default.
    24832483 * @since 5.5.0 The `custom-logo` feature now also accepts 'unlink-homepage-logo'.
    2484  * @since 5.6.0 The `post-formats` feature now returns doing it wrong if no array is passed
     2484 * @since 5.6.0 The `post-formats` feature warns if no array is passed.
    24852485 *
    24862486 * @global array $_wp_theme_features
  • trunk/tests/phpunit/tests/post/formats.php

    r49344 r49354  
    77    function setUp() {
    88        parent::setUp();
    9     }
    10 
    11     /**
    12      * @ticket 51390
    13      */
    14     function test_post_format_doing_it_wrong() {
    15         $this->setExpectedIncorrectUsage( "add_theme_support( 'post-formats' )" );
    16 
    17         // The second parameter should be an array.
    18         $this->assertFalse( add_theme_support( 'post-formats' ) );
    199    }
    2010
  • trunk/tests/phpunit/tests/theme/support.php

    r48937 r49354  
    133133    }
    134134
     135    /**
     136     * @ticket 51390
     137     *
     138     * @expectedIncorrectUsage add_theme_support( 'post-formats' )
     139     */
     140    function test_supports_post_formats_doing_it_wrong() {
     141        // The second parameter should be an array.
     142        $this->assertFalse( add_theme_support( 'post-formats' ) );
     143    }
     144
    135145    function supports_foobar( $yesno, $args, $feature ) {
    136146        if ( $args[0] === $feature[0] ) {
Note: See TracChangeset for help on using the changeset viewer.