WordPress.org

Make WordPress Core

Changeset 40350


Ignore:
Timestamp:
03/29/17 17:05:41 (3 months ago)
Author:
jnylen0
Message:

Tests: Remove a couple of invalid error assertions.

A couple of REST API tests had an assertion assertNotInstanceOf( 'WP_Error', $response ); which will never be true.

Since these assertions are invalid, and also made redundant by the response status check, we can just remove them.

Props dlh.
Fixes #40270.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/rest-api/rest-posts-controller.php

    r40324 r40350  
    28362836        $response = $this->server->dispatch( $request ); 
    28372837 
    2838         $this->assertNotInstanceOf( 'WP_Error', $response ); 
    28392838        $this->assertEquals( 200, $response->get_status() ); 
    28402839        $data = $response->get_data(); 
     
    28512850        $response = $this->server->dispatch( $request ); 
    28522851 
    2853         $this->assertNotInstanceOf( 'WP_Error', $response ); 
    28542852        $this->assertEquals( 200, $response->get_status() ); 
    28552853        $data = $response->get_data(); 
Note: See TracChangeset for help on using the changeset viewer.