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/includes/testcase-rest-post-type-controller.php

    r42343 r42863  
    201201
    202202    protected function check_get_posts_response( $response, $context = 'view' ) {
    203         $this->assertNotInstanceOf( 'WP_Error', $response );
     203        $this->assertNotWPError( $response );
    204204        $response = rest_ensure_response( $response );
    205205        $this->assertEquals( 200, $response->get_status() );
     
    233233
    234234    protected function check_get_post_response( $response, $context = 'view' ) {
    235         $this->assertNotInstanceOf( 'WP_Error', $response );
     235        $this->assertNotWPError( $response );
    236236        $response = rest_ensure_response( $response );
    237237        $this->assertEquals( 200, $response->get_status() );
     
    244244
    245245    protected function check_create_post_response( $response ) {
    246         $this->assertNotInstanceOf( 'WP_Error', $response );
     246        $this->assertNotWPError( $response );
    247247        $response = rest_ensure_response( $response );
    248248
     
    257257
    258258    protected function check_update_post_response( $response ) {
    259         $this->assertNotInstanceOf( 'WP_Error', $response );
     259        $this->assertNotWPError( $response );
    260260        $response = rest_ensure_response( $response );
    261261
Note: See TracChangeset for help on using the changeset viewer.