Make WordPress Core


Ignore:
Timestamp:
06/22/2021 04:34:29 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Tests: Use more appropriate assertions in a few tests.

Follow-up to [34804], [41376], [50959], [51124].

See #52625.

File:
1 edited

Legend:

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

    r51138 r51196  
    624624            }
    625625        );
     626
    626627        $this->assertSame( $generic, wp_revisions_to_keep( $post ) );
    627628
     
    634635            }
    635636        );
     637
    636638        $this->assertSame( $expected, wp_revisions_to_keep( $post ) );
    637639    }
     
    643645     */
    644646    public function test_wp_save_post_revision_error() {
    645         $post     = self::factory()->post->create_and_get(
     647        $post = self::factory()->post->create_and_get(
    646648            array(
    647649                'ID' => PHP_INT_MAX,
    648650            )
    649651        );
     652
    650653        $revision = _wp_put_post_revision( $post );
    651         $this->assertTrue( is_wp_error( $revision ) );
     654
     655        $this->assertWPError( $revision );
    652656    }
    653657}
Note: See TracChangeset for help on using the changeset viewer.