Make WordPress Core


Ignore:
Timestamp:
03/20/2018 10:34:11 PM (7 years ago)
Author:
johnbillion
Message:

Build/Test Tools: Implement assertNotWPError() in appropriate places in the test suite.

Props birgire

Fixes #42065

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/admin/includesPost.php

    r42343 r42863  
    3333
    3434        $_results = _wp_translate_postdata( false, $_post_data );
    35         $this->assertNotInstanceOf( 'WP_Error', $_results );
     35        $this->assertNotWPError( $_results );
    3636        $this->assertEquals( $_post_data['post_author'], $_results['post_author'] );
    3737        $this->assertEquals( 'draft', $_results['post_status'] );
     
    4444
    4545        $_results = _wp_translate_postdata( false, $_post_data );
    46         $this->assertNotInstanceOf( 'WP_Error', $_results );
     46        $this->assertNotWPError( $_results );
    4747        $this->assertEquals( $_post_data['post_author'], $_results['post_author'] );
    4848        $this->assertEquals( 'pending', $_results['post_status'] );
     
    8383
    8484        $_results = _wp_translate_postdata( false, $_post_data );
    85         $this->assertNotInstanceOf( 'WP_Error', $_results );
     85        $this->assertNotWPError( $_results );
    8686        $this->assertEquals( $_post_data['post_author'], $_results['post_author'] );
    8787        $this->assertEquals( 'draft', $_results['post_status'] );
     
    9494
    9595        $_results = _wp_translate_postdata( false, $_post_data );
    96         $this->assertNotInstanceOf( 'WP_Error', $_results );
     96        $this->assertNotWPError( $_results );
    9797        $this->assertEquals( $_post_data['post_author'], $_results['post_author'] );
    9898        $this->assertEquals( 'publish', $_results['post_status'] );
     
    105105
    106106        $_results = _wp_translate_postdata( false, $_post_data );
    107         $this->assertNotInstanceOf( 'WP_Error', $_results );
     107        $this->assertNotWPError( $_results );
    108108        $this->assertEquals( $_post_data['post_author'], $_results['post_author'] );
    109109        $this->assertEquals( 'draft', $_results['post_status'] );
     
    118118
    119119        $_results = _wp_translate_postdata( true, $_post_data );
    120         $this->assertNotInstanceOf( 'WP_Error', $_results );
     120        $this->assertNotWPError( $_results );
    121121        $this->assertEquals( $_post_data['post_author'], $_results['post_author'] );
    122122        $this->assertEquals( 'draft', $_results['post_status'] );
Note: See TracChangeset for help on using the changeset viewer.