[wp-trac] [WordPress Trac] #40270: Incorrect error assertions in some REST API tests

WordPress Trac noreply at wordpress.org
Wed Mar 29 17:05:43 UTC 2017


#40270: Incorrect error assertions in some REST API tests
--------------------------+------------------------------
 Reporter:  dlh           |       Owner:  jnylen0
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  REST API      |     Version:
 Severity:  normal        |  Resolution:  fixed
 Keywords:                |     Focuses:
--------------------------+------------------------------
Changes (by jnylen0):

 * owner:   => jnylen0
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"40350"]:
 {{{
 #!CommitTicketReference repository="" revision="40350"
 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.
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40270#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list