Make WordPress Core


Ignore:
Timestamp:
07/11/2020 09:13:56 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Revisions: Restore the return value of wp_get_post_autosave() to the documented type of WP_Post for backward compatibility.

Follow-up to [48422].

See #34560.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/customize/manager.php

    r48422 r48438  
    18921892        // Verify that autosave happened.
    18931893        $autosave_revision = wp_get_post_autosave( $changeset_post_id, get_current_user_id() );
    1894         $this->assertInstanceOf( 'stdClass', $autosave_revision );
     1894        $this->assertInstanceOf( 'WP_Post', $autosave_revision );
    18951895        $this->assertContains( 'Draft Title', get_post( $changeset_post_id )->post_content );
    18961896        $this->assertContains( 'Autosave Title', $autosave_revision->post_content );
Note: See TracChangeset for help on using the changeset viewer.