Make WordPress Core


Ignore:
Timestamp:
03/24/2023 04:12:35 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Tests: Move wp_dropdown_pages() tests to their own file.

This aims to make the tests more discoverable and easier to expand.

Includes removing a basic test hidden among get_pages() tests, as there is already a more comprehensive set of tests available.

Follow-up to [1279/tests], [28399], [31338].

See #57841.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/post/getPages.php

    r55588 r55590  
    485485        $pages = get_pages( array( 'parent' => array( $page_id1, $page_id2 ) ) );
    486486        $this->assertSameSets( array( $page_id2, $page_id3, $page_id4 ), wp_list_pluck( $pages, 'ID' ) );
    487     }
    488 
    489     /**
    490      * @ticket 22389
    491      */
    492     public function test_wp_dropdown_pages() {
    493         self::factory()->post->create_many( 5, array( 'post_type' => 'page' ) );
    494 
    495         preg_match_all( '#<option#', wp_dropdown_pages( 'echo=0' ), $matches );
    496 
    497         $this->assertCount( 5, $matches[0] );
    498487    }
    499488
Note: See TracChangeset for help on using the changeset viewer.