Make WordPress Core

Changeset 54055


Ignore:
Timestamp:
09/01/2022 06:42:56 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Tests: Correct the @covers tag in a WP_REST_Posts_Controller test for unique post slugs.

This addresses a notice when generating the code coverage report:

"@covers WP_REST_Request::create_item" is invalid

The WP_REST_Request class does not have a create_item() method, WP_REST_Posts_Controller is the class being tested here.

Includes fixing a typo in the test method name.

Follow-up to [53813].

See #52422, #55652.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/rest-api/rest-posts-controller.php

    r53935 r54055  
    52535253     * @ticket 52422
    52545254     *
    5255      * @covers WP_REST_Request::create_item
     5255     * @covers WP_REST_Posts_Controller::create_item
    52565256     */
    5257     public function test_draft_post_do_not_have_the_same_slug_as_existing_post() {
     5257    public function test_draft_post_does_not_have_the_same_slug_as_existing_post() {
    52585258        wp_set_current_user( self::$editor_id );
    52595259        $this->factory()->post->create( array( 'post_name' => 'sample-slug' ) );
Note: See TracChangeset for help on using the changeset viewer.