Skip to content

Commit

Permalink
Implemented the suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
narenin committed Dec 9, 2024
1 parent e961234 commit 1b74871
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tests/phpunit/tests/post/wpGetAutoSave.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* @group post
*/
class Tests_Post_GetPostAutosave extends WP_UnitTestCase {
class Tests_Post_wpGetPostAutosave extends WP_UnitTestCase {

/**
* Admin user ID.
Expand All @@ -27,9 +27,9 @@ class Tests_Post_GetPostAutosave extends WP_UnitTestCase {
protected static $post_id;

/**
* Ticket #62658
* Set up before class.
*
* @see https://core.trac.wordpress.org/ticket/62658
* @param WP_UnitTest_Factory $factory Factory.
*/
public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) {
self::$admin_id = $factory->user->create( array( 'role' => 'administrator' ) );
Expand All @@ -41,6 +41,8 @@ public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) {

/**
* Test when no autosave exists for a post.
*
* @ticket 62658
*/
public function test_no_autosave_exists() {
$autosave = wp_get_post_autosave( self::$post_id );
Expand All @@ -49,6 +51,8 @@ public function test_no_autosave_exists() {

/**
* Test when an autosave exists for a post.
*
* @ticket 62658
*/
public function test_autosave_exists() {
$autosave_id = wp_insert_post(
Expand All @@ -71,6 +75,8 @@ public function test_autosave_exists() {

/**
* Test when an autosave exists for a specific user.
*
* @ticket 62658
*/
public function test_autosave_for_specific_user() {
$autosave_id = wp_insert_post(
Expand Down

0 comments on commit 1b74871

Please sign in to comment.