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.

git-svn-id: https://develop.svn.wordpress.org/trunk@54055 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2022-09-01 18:42:56 +00:00
parent 14410c50da
commit 36bc1177cd

View File

@ -5252,9 +5252,9 @@ class WP_Test_REST_Posts_Controller extends WP_Test_REST_Post_Type_Controller_Te
/**
* @ticket 52422
*
* @covers WP_REST_Request::create_item
* @covers WP_REST_Posts_Controller::create_item
*/
public function test_draft_post_do_not_have_the_same_slug_as_existing_post() {
public function test_draft_post_does_not_have_the_same_slug_as_existing_post() {
wp_set_current_user( self::$editor_id );
$this->factory()->post->create( array( 'post_name' => 'sample-slug' ) );